*/ protected $policies = []; /** * Register the application's policies. * * @return void */ public function register() { $this->booting(function () { $this->registerPolicies(); }); } /** * Register the application's policies. * * @return void */ public function registerPolicies() { foreach ($this->policies() as $model => $policy) { Gate::policy($model, $policy); } } /** * Get the policies defined on the provider. * * @return array */ public function policies() { return $this->policies; } }