当前位置: 首页>>代码示例>>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;未经允许,请勿转载。