Skip to content

Commit

Permalink
Merge pull request #145 from tighten/shift-133489
Browse files Browse the repository at this point in the history
Upgrade to Laravel 11
  • Loading branch information
mateusjunges authored Nov 15, 2024
2 parents 16e4b11 + 7cb8b3e commit 87076d6
Show file tree
Hide file tree
Showing 43 changed files with 1,124 additions and 3,056 deletions.
16 changes: 14 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ APP_KEY=
APP_DEBUG=true
APP_URL=http://consoles.test

APP_TIMEZONE=UTC
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database
BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
Expand All @@ -13,11 +22,14 @@ DB_DATABASE=consoles
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
BROADCAST_CONNECTION=log
CACHE_STORE=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
Expand Down
28 changes: 0 additions & 28 deletions app/Console/Kernel.php

This file was deleted.

30 changes: 0 additions & 30 deletions app/Exceptions/Handler.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
abstract class Controller extends BaseController
{
use AuthorizesRequests, ValidatesRequests;
}
69 changes: 0 additions & 69 deletions app/Http/Kernel.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/Authenticate.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/EncryptCookies.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/PreventRequestsDuringMaintenance.php

This file was deleted.

28 changes: 0 additions & 28 deletions app/Http/Middleware/RedirectIfAuthenticated.php

This file was deleted.

19 changes: 0 additions & 19 deletions app/Http/Middleware/TrimStrings.php

This file was deleted.

20 changes: 0 additions & 20 deletions app/Http/Middleware/TrustHosts.php

This file was deleted.

23 changes: 0 additions & 23 deletions app/Http/Middleware/TrustProxies.php

This file was deleted.

22 changes: 0 additions & 22 deletions app/Http/Middleware/ValidateSignature.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/VerifyCsrfToken.php

This file was deleted.

21 changes: 21 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@

namespace App\Providers;

use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
/**
* The path to your application's "home" route.
*
* Typically, users are redirected here after authentication.
*
* @var string
*/
public const HOME = '/home';

/**
* Register any application services.
*/
Expand All @@ -20,5 +32,14 @@ public function register(): void
public function boot(): void
{
//

$this->bootRoute();
}

public function bootRoute(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
}
Loading

0 comments on commit 87076d6

Please sign in to comment.