File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace App \Providers ;
4+
5+ use Illuminate \Contracts \Auth \Access \Gate as GateContract ;
6+ use Illuminate \Foundation \Support \Providers \AuthServiceProvider as ServiceProvider ;
7+
8+ class AuthServiceProvider extends ServiceProvider
9+ {
10+ /**
11+ * The policy mappings for the application.
12+ *
13+ * @var array
14+ */
15+ protected $ policies = [
16+ 'App\Model ' => 'App\Policies\ModelPolicy ' ,
17+ ];
18+
19+ /**
20+ * Register any application authentication / authorization services.
21+ *
22+ * @param \Illuminate\Contracts\Auth\Access\Gate $gate
23+ * @return void
24+ */
25+ public function boot (GateContract $ gate )
26+ {
27+ parent ::registerPolicies ($ gate );
28+
29+ //
30+ }
31+ }
Original file line number Diff line number Diff line change 141141 * Application Service Providers...
142142 */
143143 App \Providers \AppServiceProvider::class,
144+ App \Providers \AuthServiceProvider::class,
144145 App \Providers \EventServiceProvider::class,
145146 App \Providers \RouteServiceProvider::class,
146147
You can’t perform that action at this time.
0 commit comments