How to implement rememeber me functionality in laravel 5.1? Can anyone give me an example? Answer Laravel authentication offers remember me functionality out of the box. In order to use it you need to do 2 things: add remember_token column in your users table – this is where the token will be stored pass true as a second parameter of
Tag: laravel-5.1
Laravel : App::setLocale doesn’t work
I’m using laravel 5.1, I’m trying to update locale in app file like this : In Locale Middleware file : … public function handle($request, Closure $next) { if(Session::has(‘locale’…
Sorting Children in Laravel : How do I sort children by name?
Below is my controller code When I access my categories and its children in the view, the categories seem to be sorted by name but the children categories are not. How do I sort the children categories as well by name? Also, is it possible to sort the categories using a different criteria than the children eg. By position for
Laravel – Set global variable from settings table
I’m trying to store all my settings from my settings table into a global variable, but I’m stucked now(I have no idea what’s the next step), this is my actual model and seeder: model – Settings.php seeder – SettingsTableSeeder.php How can I store all the data inside the settings table and make then acessible from blade, or any controller or
upload_max_filesize doesn’t change within Laravel 5.1
I’m working on multiple file upload while that time I’ve got an error The file “theOne.mp3” exceeds your upload_max_filesize ini directive (limit is 2048 KiB). So after that I’ve increased the …
Update table structure without rollback in Laravel 5.1
I am beginner in Laravel. I use migrate to create tables in a database, but I don’t want to migrate:rollback to update my table. I want to apply changes in my old database without loosing current …
Which to use Auth::check() or Auth::user() – Laravel 5.1?
If I want to check whether the user is logged in within my Laravel 5.1 application I can either use or is there a reason to prefer one over the other when checking if a user is logged in? Answer Auth::check() defers to Auth::user(). It’s been that way since as long as I can remember. In other words, Auth::check() calls
Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException
The relevant code is shown below: I’ve been trying to figure this out for hours now, I honestly have no idea what to do at this point. Note, that if I use the form method everything works just fine. I’ve also tried sending the CSRF token as a parameter in the postString: “_token=” + csrfToken Answer The problem was resolved
How to execute raw queries with Laravel 5.1?
So I have this tiny query to run on my DB and it works fine in MySQL Workbench. Basically, a SELECT with LEFT JOIN and UNION with LEFT JOIN again. SELECT cards.id_card, cards.hash_card, …
Laravel Homestead Swift Cannot send message without a sender address
I get this error with stock email settings in Laravel 5.1 Homestead when I try to send a password reset mail. Swift_TransportException in AbstractSmtpTransport.php line 162:Cannot send message …