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


PHP Flash::message方法代码示例

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


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

示例1: store

 /**
  * Store a newly created resource in storage.
  *
  * @param RegisterRequest $request
  * @param Authenticator   $auth
  * @return Response
  */
 public function store(RegisterUserRequest $request, Authenticator $auth)
 {
     $user = $this->execute($request);
     $auth->login($user);
     Flash::message('Glad to have you as a new Larabook member!');
     return redirect()->route('home');
 }
开发者ID:billwaddyjr,项目名称:Larabook2.0,代码行数:14,代码来源:RegistrationController.php

示例2: seed

 /**
  * Run the seed command for the given module
  * @param  SeedModuleRequest $request
  * @return mixed
  */
 public function seed(SeedModuleRequest $request)
 {
     $output = new BufferedOutput();
     Artisan::call('module:seed', ['module' => $request->module], $output);
     Flash::message($output->fetch());
     return Redirect::route('admin.workshop.workbench.index');
 }
开发者ID:Houbsi,项目名称:Workshop,代码行数:12,代码来源:WorkbenchController.php

示例3: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(CreateQuizRequest $request)
 {
     $input = $request->all();
     $quiz = Quiz::create($input);
     Flash::message('Quiz saved successfully.');
     return redirect(route('lessons.edit', [$quiz->lesson_id]))->with('active_tab', 'quiz');
 }
开发者ID:jclyons52,项目名称:mycourse-rocks,代码行数:12,代码来源:QuizController.php

示例4: store

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

示例5: postSetPrice

 public function postSetPrice(SetPriceRequest $request)
 {
     $order = Order::find($request->id);
     $order->price = $request->price;
     $order->status = 'quote sent';
     $order->save();
     Flash::message('Price set!');
     return redirect()->back();
 }
开发者ID:handmadedigital,项目名称:the_sneaker_list,代码行数:9,代码来源:ShoeRequestController.php

示例6: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     if (Auth::user()->is_admin == false) {
         Auth::logout();
         Flash::message('You are not allowed here!');
         return redirect()->to('/auth/log-in');
     }
     return $next($request);
 }
开发者ID:handmadedigital,项目名称:the_sneaker_list,代码行数:16,代码来源:IsAdmin.php

示例7: postLogin

 public function postLogin(LoginRequest $request)
 {
     $credentials = $request->only('email', 'password');
     if ($this->auth->attempt($credentials, $request->has('remember'))) {
         Flash::message('You are now logged in');
         return redirect()->intended('/' . $this->auth->user()->id . '/orders');
     }
     Flash::error('Incorrect credentials');
     return redirect()->back();
 }
开发者ID:handmadedigital,项目名称:the_sneaker_list,代码行数:10,代码来源:SessionController.php

示例8: store

 /**
  * @param SignInRequest $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function store(SignInRequest $request)
 {
     $input = $request->only('email', 'password');
     if (!\Auth::attempt($input)) {
         Flash::message('Wrong credentials');
         return Redirect::back()->withInput();
     }
     Flash::message('Welcome Back!');
     return Redirect::intended('statuses');
 }
开发者ID:sabahtalateh,项目名称:laracast,代码行数:14,代码来源:SessionsController.php

示例9: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(AddNewHouseholdMemberRequest $request, $household)
 {
     // add extra param head id
     if (!$request->has('household_id')) {
         $request->merge(['household_id' => $household]);
     }
     $this->dispatchFrom(AddNewHouseholdMemberJob::class, $request);
     Flash::message('Successfully added member. However it requires activation on his/her email account.');
     return redirect($this->redirectPath);
 }
开发者ID:ehomeuc,项目名称:ehome,代码行数:16,代码来源:HouseholdMembersController.php

示例10: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(SendEmailRequest $emailRequest)
 {
     $values = $emailRequest->all();
     $values['status'] = 1;
     if ($values['birthday'] === '') {
         Email::create($values);
         Flash::message('Your email has been sent. Thank you!');
     }
     return redirect('contact');
 }
开发者ID:annafleming,项目名称:annafleming.com,代码行数:15,代码来源:ContactController.php

示例11: contact

 public function contact(Request $request)
 {
     $input = $request->all();
     Mail::send('emails.contact', $input, function ($message) use($input) {
         $message->from($input['email'], $input['firstname'] . ' ' . $input['lastname']);
         $message->to('jclyons52@gmail.com', 'Joseph Lyons')->subject($input['subject']);
     });
     Flash::message('Your message has been sent');
     return redirect()->back();
 }
开发者ID:jclyons52,项目名称:mycourse-rocks,代码行数:10,代码来源:PageController.php

示例12: store

 public function store(Requests\ProdutoRequest $request)
 {
     //este metodo recebe os parametros passasdos pelo formulario
     //vamos pegar todos os parametros e armarzenar no banco de dados
     Produto::create($request->all());
     //armazena a mensagem
     Flash::message("Produto adicionado com sucesso!");
     //e em seguida redirecionar o usuario para a pagina com a lista dos produtos cadastrados
     return redirect()->route('produtos.index');
 }
开发者ID:Brendow007,项目名称:meuprojeto,代码行数:10,代码来源:ProdutoController.php

示例13: create

 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     $confirmation_code = str_random(30);
     $data = array_add($data, 'conf', $confirmation_code);
     Flash::message('Welcome ' . $data["name"] . '. Thanks for registering. We have sent you a validation link in your e-mail address!');
     Mail::send('emails.verify', $data, function ($message) use($data) {
         $message->to($data['email'], $data['name'])->subject('Verify your email address');
     });
     return User::create(['name' => $data['name'], 'lastname' => $data['lastname'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'confirmation_code' => $confirmation_code]);
 }
开发者ID:xhulioh25,项目名称:laravel-registration-verification,代码行数:16,代码来源:Registrar.php

示例14: postRemind

 /**
  * Handle a POST request to remind a user of their password.
  *
  * @param  Request  $request
  * @return Response
  */
 public function postRemind(Request $request)
 {
     switch ($response = $this->passwords->remind($request->only('email'))) {
         case PasswordBroker::INVALID_USER:
             Flash::error(trans($response));
             return redirect()->back();
         case PasswordBroker::REMINDER_SENT:
             Flash::message(trans($response));
             return redirect()->back();
     }
 }
开发者ID:billwaddyjr,项目名称:Larabook2.0,代码行数:17,代码来源:RemindersController.php

示例15: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(CreateLessonRequest $request)
 {
     $input = $request->all();
     $lesson = Lesson::create($input);
     $links = $request->input('links');
     if ($links) {
         $this->sync($lesson, $links);
     }
     Flash::message('Lesson saved successfully.');
     return redirect(route('lessons.edit', [$lesson->id]));
 }
开发者ID:jclyons52,项目名称:mycourse-rocks,代码行数:16,代码来源:LessonController.php


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