Laravel 5.2 tips tricks

How to generate auth login, register bootstrap views

php artisan make:auth

How to change redirect after login

On AuthController.php

protected $redirectTo = 'notices/create';

How to fix no session after redirect using middleware auth

Route::group(['middleware' => ['web']], function () {

How to use HTML Form Helper LaravelCollective

composer require laravelcollective/html

How to add additional method for resource controllers

Route::get('photos/popular', '[email protected]');

Route::resource('photos', 'PhotoController');

How to clear cache and config cache

php artisan clear:cache
php artisan config:cache

How to get current username and email

Migration with table id and timestamp

php artisan make:migration create_notices_table --create=notices

Reference js, css in public folder


Ajax and JS helper for Laravel

Laravel 5 Form Request with multiple validation rules and unique check on Update