當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。