當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Session::flash方法代碼示例

本文整理匯總了PHP中Session::flash方法的典型用法代碼示例。如果您正苦於以下問題:PHP Session::flash方法的具體用法?PHP Session::flash怎麽用?PHP Session::flash使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Session的用法示例。


在下文中一共展示了Session::flash方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testFlash

 /**
  * @covers $this->object->flash
  */
 public function testFlash()
 {
     $this->object->flash('test', 'Trixie');
     $this->object->flash('test', 'Tinkerbell');
     $this->assertEquals('Tinkerbell', $this->object->flash('test'));
     $this->assertEquals(null, $this->object->flash('test'));
 }
開發者ID:PermeAgility,項目名稱:FrameworkBenchmarks,代碼行數:10,代碼來源:sessionTest.php

示例2: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(Request $request)
 {
     $this->validate($request, ['razonsocial' => 'required', 'numero' => 'required|unique:cuits,numero']);
     Cuit::create($request->all());
     \Session::flash('message', 'Cuit added!');
     return redirect('cuits');
 }
開發者ID:sebabarr,項目名稱:mesa,代碼行數:12,代碼來源:CuitsController.php

示例3: getLogout

 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     $user = \Auth::user()->name;
     \Auth::logout();
     \Session::flash('flash_message', $user . ': You have been logged out.');
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
開發者ID:dmorgorg,項目名稱:photos,代碼行數:12,代碼來源:AuthController.php

示例4: index

 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     if (\Auth::user()->status != 1) {
         \Session::flash('message', 'You are Blocked by Admin');
     }
     return view('home');
 }
開發者ID:bimnaresh,項目名稱:recruitment_history,代碼行數:12,代碼來源:HomeController.php

示例5: archive

 public function archive($publicId)
 {
     $branch = Branch::scope($publicId)->firstOrFail();
     $branch->delete();
     Session::flash('message', trans('texts.archived_branch'));
     return Redirect::to('company/branches');
 }
開發者ID:Vrian7ipx,項目名稱:cascadadev,代碼行數:7,代碼來源:BranchController.php

示例6: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $account = new Account();
     $account->setDomain(Input::get('domain'));
     $account->setNit(Input::get('nit'));
     $account->setName(Input::get('name'));
     $account->setEmail(Input::get('email'));
     // return $account->getErrorMessage();
     if ($account->Guardar()) {
         //redireccionar con el mensaje a la siguiente vista
         Session::flash('mensaje', $account->getErrorMessage());
         $direccion = "http://" . $account->domain . ".emizor.com";
         //enviando correo de bienvenida
         global $correo;
         $correo = $account->getEmail();
         // return Response::json($correo);
         Mail::send('emails.bienvenida', array('direccion' => $direccion, 'name' => $account->getName(), 'nit' => $account->getNit()), function ($message) {
             global $correo;
             $message->to($correo, '')->subject('Emizor');
         });
         //
         // $direccion = "/crear/sucursal";
         return Redirect::to($direccion);
     }
     Session::flash('error', $account->getErrorMessage());
     return Redirect::to('crear');
 }
開發者ID:Vrian7ipx,項目名稱:firstmed,代碼行數:32,代碼來源:IpxController.php

示例7: getPage

 public function getPage($section = false, $page = false)
 {
     if ($section === false || $page === false) {
         return Redirect::to('/' . getLang());
     }
     $this->loadQuestions();
     if (!isset($this->quiz[$section]['pages']['page' . $page])) {
         return Redirect::to('/' . getLang());
     }
     if ($section != 'demographics' && $this->screenersAnswered == false) {
         \Session::flash('flash_message', 'Please complete the "Demographics" section before continuing');
         return Redirect::to('/quiz/demographics/' . $this->screenerToAnswer);
     }
     $data = $this->quiz[$section];
     $sectionQuestions = $data['pages']['page' . $page];
     $script = false;
     foreach ($sectionQuestions['questions'] as $number => $question) {
         if (isset($question['script'])) {
             $script[] = $question['script'];
         }
     }
     $currentLocal = App::getLocale();
     $localQuestions = $currentLocal == 'en' ? '' : $currentLocal;
     $btnsize = '-small';
     if ($localQuestions == 'es') {
         $btnsize = '-small lang';
     }
     $vars = array('questions' => $sectionQuestions['questions'], 'heading' => Lang::get('general.title'), 'title' => $data['title'], 'report' => false, 'menu' => $this->menu, 'progress' => $this->totAnswered > 0 ? floor($this->totAnswered / $this->totQuestions * 100) : 0, 'colour' => $data['colour'], 'section' => $section, 'page' => $page, 'script' => $script, 'btnsize' => $btnsize);
     return View::make('question', $vars);
     //return $vars['questions'];
     //return $this->quiz;
 }
開發者ID:roarkmccolgan,項目名稱:dellconvergedmaturity,代碼行數:32,代碼來源:AssesmentController.php

示例8: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $familia = Familia::findOrFail($id);
     $validator = Familia::validator(Input::all());
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     $datos = Input::all();
     if (Input::file('foto')) {
         $file = Input::file('foto');
         $destinationPath = 'uploads/images/';
         $filename = Str::random(20) . '.' . $file->getClientOriginalExtension();
         $mimeType = $file->getMimeType();
         $extension = $file->getClientOriginalExtension();
         $upload_success = $file->move($destinationPath, $filename);
         if ($familia->foto != 'fam.jpg') {
             File::delete($destinationPath . $familia->foto);
         }
         $datos['foto'] = $filename;
     } else {
         unset($datos['foto']);
     }
     $familia->update($datos);
     Session::flash('message', 'Actualizado Correctamente');
     Session::flash('class', 'success');
     return Redirect::to('/dashboard/familia');
 }
開發者ID:bjohnmer,項目名稱:sf,代碼行數:33,代碼來源:FamiliasController.php

示例9: store

 /**
  * Store a newly created resource in storage.
  * POST /invoice
  *
  * @return Response
  */
 public function store()
 {
     $validator = Validator::make(Input::all(), Invoice::$rules);
     if ($validator->fails()) {
         return Redirect::to('invoice')->withErrors($validator)->withInput(Input::all());
     } else {
         $invoice = new Invoice();
         $invoice->no_inv = Input::get('no_inv');
         $invoice->tgl_inv = Input::get('tgl_inv');
         $invoice->no_PO = Input::get('no_PO');
         $invoice->ship_by = Input::get('ship_by');
         $invoice->pay_method = Input::get('pay_method');
         $invoice->no_rek = Input::get('no_rek');
         $invoice->pelabuhan = Input::get('pelabuhan');
         $invoice->carrier = Input::get('carrier');
         $invoice->save();
         $SPPB = Barang::join('detil_SPPB', 'barang.kode_barang', '=', 'detil_SPPB.kode_barang')->join('SPPB', 'detil_SPPB.no_SPPB', '=', 'SPPB.no_SPPB')->join('PO', 'SPPB.no_SPPB', '=', 'PO.no_SPPB')->where('no_PO', Input::get('no_PO'))->selectRaw('barang.kode_barang as barang, jml_pesan as pesan')->get();
         foreach ($SPPB as $key => $value) {
             $barang = Barang::find($value->barang);
             $barang->jml_barang = $barang->jml_barang - $value->pesan;
             $barang->save();
         }
         Session::flash('message', 'Successfully created invoice!');
         return Redirect::to('invoice');
     }
 }
開發者ID:shimohira,項目名稱:supplier,代碼行數:32,代碼來源:InvoiceController.php

示例10: getDelete

 public function getDelete($id)
 {
     $guest = guest::find($id);
     $guest->delete();
     Session::flash('message', 'The records are deleted successfully');
     return Redirect::to('guest');
 }
開發者ID:andrinda,項目名稱:myhotel,代碼行數:7,代碼來源:GuestController.php

示例11: destroy

 public function destroy($id)
 {
     $ac = Activity::find($id);
     $ac->delete();
     Session::flash('success', 'Data telah dihapus.');
     return Redirect::to('/' . Auth::user()->role . '/activity');
 }
開發者ID:heruujoko,項目名稱:tsel-net-management,代碼行數:7,代碼來源:ActivityController.php

示例12: destroy

 public function destroy($id)
 {
     $bantek = Bantek::find($id);
     $bantek->delete();
     Session::flash('success', 'Data telah dihapus');
     return Redirect::to('admin/bantek');
 }
開發者ID:heruujoko,項目名稱:tsel-net-management,代碼行數:7,代碼來源:BantekController.php

示例13: getDelete

 public function getDelete($id)
 {
     $regions = Regions::find($id);
     $regions->delete();
     Session::flash('message', 'The records are deleted successfully');
     return Redirect::to('regions');
 }
開發者ID:andrinda,項目名稱:myhotel,代碼行數:7,代碼來源:RegionsController.php

示例14: register

 /**
  * POST /register
  *
  * @return \View
  * @throws \Report\Managers\ValidationException
  */
 public function register()
 {
     $manager = new RegisterManager($this->userRepo->newUser(), Input::all());
     $manager->save();
     Session::flash('message', 'register-sucess');
     return Redirect::route('sing-in');
 }
開發者ID:iscnorena,項目名稱:report,代碼行數:13,代碼來源:UserController.php

示例15: update

    public function update($id)
    {
        $data = Setting::find($id);
        $data->email_sender = Input::get('email');
        $data->protokol = Input::get('protokol');
        $data->port = Input::get('port');
        $data->host = Input::get('host');
        $data->user_email = Input::get('user');
        $data->pass_email = Input::get('pass');
        $data->save();
        if ($data->save()) {
            Session::flash('messages', '
					<div class="alert alert-info alert-dismissable" id="notif">
                    		<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    		<strong>Keterangan</strong><br>
                    			Setting berhasil disimpan
                		</div>
				');
        } else {
            Session::flash('messages', '
					<div class="alert alert-danger alert-dismissable" id="notif">
                    		<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    		<strong>Peringatan...</strong><br>
                    			Settig gagal disimpan
                		</div>
				');
        }
        return Redirect::to('admin/setting/email');
    }
開發者ID:komaltech,項目名稱:RPPv2,代碼行數:29,代碼來源:SettingController.php


注:本文中的Session::flash方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。