Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1660 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 1660 Revision 1662
Zeile 22... Zeile 22...
22
        /**
22
        /**
23
         * Define your route model bindings, pattern filters, and other route configuration.
23
         * Define your route model bindings, pattern filters, and other route configuration.
24
         *
24
         *
25
         * @return void
25
         * @return void
26
         */
26
         */
27
        public function boot()
27
        public function boot(): void
28
        {
28
        {
29
            $this->configureRateLimiting();
29
            $this->configureRateLimiting();
Zeile 30... Zeile 30...
30
 
30
 
31
            $this->routes( function ()
31
            $this->routes( function ()
Zeile 46... Zeile 46...
46
        /**
46
        /**
47
         * Configure the rate limiters for the application.
47
         * Configure the rate limiters for the application.
48
         *
48
         *
49
         * @return void
49
         * @return void
50
         */
50
         */
51
        protected function configureRateLimiting()
51
        protected function configureRateLimiting(): void
52
        {
52
        {
53
            RateLimiter::for( 'api', function ( Request $request )
53
            RateLimiter::for( 'api', function ( Request $request )
54
            {
54
            {
55
                return Limit::perMinute( 60 )->by( $request->user()?->id ? : $request->ip() );
55
                return Limit::perMinute( 60 )->by( $request->user()?->id ? : $request->ip() );
56
            } );
56
            } );