Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Foundation\Support\Providers;
4
 
5
use Illuminate\Support\Facades\Gate;
6
use Illuminate\Support\ServiceProvider;
7
 
8
class AuthServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * The policy mappings for the application.
12
     *
13
     * @var array<class-string, class-string>
14
     */
15
    protected $policies = [];
16
 
17
    /**
18
     * Register the application's policies.
19
     *
20
     * @return void
21
     */
22
    public function registerPolicies()
23
    {
24
        foreach ($this->policies() as $model => $policy) {
25
            Gate::policy($model, $policy);
26
        }
27
    }
28
 
29
    /**
30
     * Get the policies defined on the provider.
31
     *
32
     * @return array<class-string, class-string>
33
     */
34
    public function policies()
35
    {
36
        return $this->policies;
37
    }
38
}