当前位置: 首页>>代码示例>>PHP>>正文


PHP Flash::message方法代码示例

本文整理汇总了PHP中Flash::message方法的典型用法代码示例。如果您正苦于以下问题:PHP Flash::message方法的具体用法?PHP Flash::message怎么用?PHP Flash::message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Flash的用法示例。


在下文中一共展示了Flash::message方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: userHasLoggedIn

 public function userHasLoggedIn($user)
 {
     //Session::flash(): store items in the session only for the next request.
     \Session::flash('message', 'Welcome, ' . $user->name);
     \Flash::message(\Session::get('message'));
     return redirect('/home');
 }
开发者ID:ambarsetyawan,项目名称:laravel5-blog-1,代码行数:7,代码来源:AuthController.php

示例2: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $status = Status::find($id);
     $status->delete();
     Flash::message('Your status has been removed.');
     return Redirect::back();
 }
开发者ID:jamalots,项目名称:jamalot.dev,代码行数:13,代码来源:StatusController.php

示例3: destroy

 public function destroy($id)
 {
     $status = Comment::find($id);
     $status->delete();
     Flash::message('Your comment has been deleted.');
     return Redirect::back();
 }
开发者ID:jamalots,项目名称:jamalot.dev,代码行数:7,代码来源:CommentsController.php

示例4: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy($id)
 {
     $formPost = FormPost::findOrFail($id);
     $formPost->delete();
     Flash::message('Post was successfully deleted');
     return langRedirectRoute('admin.form-post.index');
 }
开发者ID:phillipmadsen,项目名称:app,代码行数:13,代码来源:FormPostController.php

示例5: store

 /**
  * Save a new status
  *
  * @return Response
  */
 public function store()
 {
     $this->publishStatusForm->validate(Input::only('body'));
     $this->execute(new PublishStatusCommand(Input::get('body'), Auth::user()->id));
     Flash::message('Your status has been updated!');
     return Redirect::refresh();
 }
开发者ID:billwaddyjr,项目名称:larabook,代码行数:12,代码来源:StatusController.php

示例6: store

 /**
  * Save a new status
  *
  * @return Response
  */
 public function store()
 {
     $input = array_add(Input::get(), 'userId', Auth::id());
     $this->publishStatusForm->validate($input);
     $this->execute(PublishStatusCommand::class, $input);
     Flash::message('Your status has been updated!');
     return Redirect::back();
 }
开发者ID:atolver,项目名称:larabook,代码行数:13,代码来源:StatusesController.php

示例7: store

 /**
  * Create a new Larabook user.
  *
  * @return string
  */
 public function store()
 {
     $this->_registrationForm->validate(Input::all());
     $user = $this->execute(RegisterUserCommand::class);
     Auth::login($user);
     Flash::message('Glad to have you as a new Larabook member!');
     return Redirect::home();
 }
开发者ID:atolver,项目名称:larabook,代码行数:13,代码来源:RegistrationController.php

示例8: generate

 public function generate(GeneratorRequest $request, $generator)
 {
     $result = $this->command->call($generator, $this->generatorMap, $request);
     if ($result) {
         \Flash::message(str_replace("\n", '<br>', $result['output']), $result['level']);
     }
     return redirect()->back();
 }
开发者ID:abrahamgreyson,项目名称:elektra,代码行数:8,代码来源:GeneratorController.php

示例9: postEdit

 /**
  * Update the specified resource in storage.
  * PUT /profile/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function postEdit()
 {
     $id = Auth::user()->id;
     $user = User::findOrFail($id);
     $user->fill(Input::all());
     $user->save();
     Flash::message('User Updated!');
     return Redirect::route('profile.edit');
 }
开发者ID:cideveloper,项目名称:MovieApp,代码行数:16,代码来源:ProfileController.php

示例10: redirect_to

 public function redirect_to($url, $flash = NULL)
 {
     if ($url instanceof ORM) {
         $url = Route::url_for($url);
     }
     if ($flash !== NULL) {
         Flash::message($flash);
     }
     $this->redirect($url);
 }
开发者ID:alshabalin,项目名称:kohana-advanced-view,代码行数:10,代码来源:Controller.php

示例11: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $input = Input::get();
     $input['userId'] = Auth::id();
     $this->publishStatusForm->validate($input);
     //we can explicity pull throw an $input, have a look at CommanderTrait.php
     $this->execute(PublishStatusCommand::class, $input);
     Flash::message('Your status has been updated!');
     return Redirect::back();
 }
开发者ID:simonsinart,项目名称:larabook,代码行数:15,代码来源:StatusesController.php

示例12: postRemind

 /**
  * Handle a POST request to remind a user of their password.
  *
  * @return Response
  */
 public function postRemind()
 {
     switch ($response = Password::remind(Input::only('email'))) {
         case Password::INVALID_USER:
             Flash::error(Lang::get($response));
             return Redirect::back();
         case Password::REMINDER_SENT:
             Flash::message(Lang::get($response));
             return Redirect::back();
     }
 }
开发者ID:billwaddyjr,项目名称:larabook,代码行数:16,代码来源:RemindersController.php

示例13: store

 public function store()
 {
     $formData = Input::only('email', 'password');
     $this->signInForm->validate($formData);
     if (!Auth::attempt($formData)) {
         Flash::message('We were unable to sign you in. Please check your credentials and try again!');
         return Redirect::back()->withInput();
     }
     Flash::message('Welcome back!');
     return Redirect::intended('home');
 }
开发者ID:FrankDupree,项目名称:phphub,代码行数:11,代码来源:AuthController.php

示例14: send

 public function send(Request $request)
 {
     //dd(Input::all);
     //TODO: SEND EMAIL
     //FLASH NOTIFICATION
     //        $request->session()->flash(
     //            'notification',
     //            'All ok!'
     //        );
     Flash::message('Ok!');
     //REDIRECT WELCOME
     return redirect()->route('welcome');
 }
开发者ID:rogermelich,项目名称:Solid_Laravel,代码行数:13,代码来源:ContactEmailController.php

示例15: checkIfUserNeedsUpdating

 public function checkIfUserNeedsUpdating($userData, $user)
 {
     $socialData = ['avatar' => $userData->avatar, 'email' => $userData->email, 'name' => $userData->name, 'username' => $userData->nickname];
     $dbData = ['avatar' => $user->avatar, 'email' => $user->email, 'name' => $user->name, 'username' => $user->username];
     if (!empty(array_diff($socialData, $dbData))) {
         $user->avatar = $userData->avatar;
         $user->email = $userData->email;
         $user->name = $userData->name;
         $user->username = $userData->nickname;
         $user->save();
         \Flash::message('User updated!');
     }
 }
开发者ID:ambarsetyawan,项目名称:laravel5-blog-1,代码行数:13,代码来源:UserRepository.php


注:本文中的Flash::message方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。