Role.php ——— id, name, status, info User.php ——— id, name, email, username, mobile, role_id role() =>…
Category: Laravel
Uploading Image in Shared Hosting
Structure of file: # LaravelProject – ecomm – travel # ecomm.com # travel.com Write following code…
Including Other Route File inside web.php
As we know there might be lots of route written inside web.php. Those route might belongs…
User – Role – Permission – Core – Laravel
Assuming we have freshly created following tables users Now create 2 following models along with its…
Broadcast – Event Broadcast Laravel
1. Define EVENT and its LISTENER in App\Providers\EventServiceProvider.php protected $listen = [ ‘App\Events\TaskEvent’ => [ ‘App\Listeners\TaskEventListener’,…
Gates in Laravel
Gates are closure Determine if a user is auth to perform a given action Gates always…
Laravel Spatie – Role Permission
Prerequisites Laravel 5.8 or higher User model must implement Illuminate\Contracts\Auth\Access\Authorizable contract. Otherwise the can() and authorize() methods will not work in…