Laravel Vuejs 实战:开发知乎 (2)用户登录
1.安装一个给用户提示的扩展包: 二选一: https://github.com/laracasts/flash 【我选的这个】 https://github.com/oanhnn/laravel-flash-message 使用方法:在需要使用falsh消息的控制器中,调用flash方法即可: 如: 1 public function store() 2 { 3 //flash('Welcome Aboard!'); 4 flash()->overlay('Welcome Aboard!', '登录提示'); 5 return home(); 6 } 同时可以如下方式调用: 1 flash('Message')->success(): Set the flash theme to "success". 2 flash('Message')->error(): Set the flash theme to "danger". 3 flash('Message')->warning(): Set the flash theme to "warning". 4 flash('Message')->overlay(): Render the message as an overlay. 5 flash()->overlay('Modal Message', 'Modal Title'):