app/Providers/AuthServiceProvider.php
/**
     * Register any authentication / authorization services.
     *
     * @return void
     */
Register any authentication / authorization services.
@return void
Register any authentication / authorization services . @return void
public function boot()
    {
        $this->registerPolicies();
        Gate::define('delete-permission', 'App\Policies\SupplierPolicy@delete');
        Gate::define('delete-permission-medicines', 'App\Policies\MedicinePolicy@delete');
        Gate::define('edit-permission-medicines', 'App\Policies\MedicinePolicy@edit');
        Gate::define('checkmember', 'App\Policies\MemberPolicy@checkmember');
    }
public function boot ( ) { $ this -> registerPolicies ( ) ; Gate :: define ( 'delete-permission' , 'App\Policies\SupplierPolicy@delete' ) ; Gate :: define ( 'delete-permission-medicines' , 'App\Policies\MedicinePolicy@delete' ) ; Gate :: define ( 'edit-permission-medicines' , 'App\Policies\MedicinePolicy@edit' ) ; Gate :: define ( 'checkmember' , 'App\Policies\MemberPolicy@checkmember' ) ; }
Register any authentication / authorization services.
Register any authentication / authorization services .
// Gate::define('delete-permission', function($user){ //    return ($user->sebagai == 'owner'); // }); //