Auth::user()->setAttribute('key','value');
unset(Auth::user()->key);
reference:
https://stackoverflow.com/questions/29190058/laravel-add-and-remove-auth-session-variables
Auth::user()->setAttribute('key','value');
unset(Auth::user()->key);
reference:
https://stackoverflow.com/questions/29190058/laravel-add-and-remove-auth-session-variables
DB::listen(function ($query) {
// $query->sql
// $query->bindings
// $query->time
});
It appears that laravel 5 no longer users the token name csrf_token, this has been abbreviated to _token.
Out of the box, laravel 5 is set to production environment.
If you use homestead for your development, you are going to have a lot of headache unless you set the environment to local.
The documentation is not clear on how to do this.
In the root folder, create a file within bootstrap/
environment.php
<php
$env = $app->detectEnvironment(function()
{
return getenv('APP_ENV') ?: 'development';
});
?>
This is the correct way to set your environment to local, and will allow you to process your migrations as you would expect them.
Recent Comments