本文整理汇总了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');
}
示例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();
}
示例3: destroy
public function destroy($id)
{
$status = Comment::find($id);
$status->delete();
Flash::message('Your comment has been deleted.');
return Redirect::back();
}
示例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');
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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');
}
示例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);
}
示例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();
}
示例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();
}
}
示例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');
}
示例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');
}
示例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!');
}
}