From c9ce5c8350ae20492944f87039025d9d9c4d1729 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 15:56:39 -0500 Subject: [PATCH 001/186] policies property is not needed with auto discovery --- app/Providers/AuthServiceProvider.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 54756cd1cbd..ddf609011fa 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -7,15 +7,6 @@ class AuthServiceProvider extends ServiceProvider { - /** - * The model to policy mappings for the application. - * - * @var array - */ - protected $policies = [ - // - ]; - /** * Register any authentication / authorization services. */ From 38971e7154f27e210692839ef7b8fc3fc66a9b21 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 17:07:55 -0500 Subject: [PATCH 002/186] auto register email verification listener --- app/Providers/EventServiceProvider.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 2d65aac0ef0..65eabb68f4a 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,24 +2,10 @@ namespace App\Providers; -use Illuminate\Auth\Events\Registered; -use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Event; class EventServiceProvider extends ServiceProvider { - /** - * The event to listener mappings for the application. - * - * @var array> - */ - protected $listen = [ - Registered::class => [ - SendEmailVerificationNotification::class, - ], - ]; - /** * Register any events for your application. */ From dcff989f9fbfbf4bdb7d310d96a1cec585e678d5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 17:29:34 -0500 Subject: [PATCH 003/186] enable event discovery by default --- app/Providers/EventServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 65eabb68f4a..79f49b8337b 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -19,6 +19,6 @@ public function boot(): void */ public function shouldDiscoverEvents(): bool { - return false; + return true; } } From f0a34f3dc4b2bb90ba596906a613ccfe4e4112d0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 17:31:41 -0500 Subject: [PATCH 004/186] move broadcast routes into provider - delete routes file --- app/Providers/BroadcastServiceProvider.php | 4 +++- routes/channels.php | 18 ------------------ 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 routes/channels.php diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 2be04f5d9da..092c8bdeea4 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -14,6 +14,8 @@ public function boot(): void { Broadcast::routes(); - require base_path('routes/channels.php'); + Broadcast::channel('App.Models.User.{id}', function ($user, $id) { + return (int) $user->id === (int) $id; + }); } } diff --git a/routes/channels.php b/routes/channels.php deleted file mode 100644 index 5d451e1fae8..00000000000 --- a/routes/channels.php +++ /dev/null @@ -1,18 +0,0 @@ -id === (int) $id; -}); From 8c643a497c756ca5ce00cf25d77eb6724d44b1fa Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 13:39:18 -0500 Subject: [PATCH 005/186] add base middleware for guest, dont use redirect to on json requests by default --- app/Http/Middleware/Authenticate.php | 2 +- .../Middleware/RedirectIfAuthenticated.php | 22 +++++-------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index d4ef6447a9c..63a433e524f 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -12,6 +12,6 @@ class Authenticate extends Middleware */ protected function redirectTo(Request $request): ?string { - return $request->expectsJson() ? null : route('login'); + return route('login'); } } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index afc78c4e539..e67219c833c 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -3,28 +3,16 @@ namespace App\Http\Middleware; use App\Providers\RouteServiceProvider; -use Closure; +use Illuminate\Auth\Middleware\RedirectIfAuthenticated as Middleware; use Illuminate\Http\Request; -use Illuminate\Support\Facades\Auth; -use Symfony\Component\HttpFoundation\Response; -class RedirectIfAuthenticated +class RedirectIfAuthenticated extends Middleware { /** - * Handle an incoming request. - * - * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next + * Get the path the user should be redirected to when they are authenticated. */ - public function handle(Request $request, Closure $next, string ...$guards): Response + protected function redirectTo(Request $request): ?string { - $guards = empty($guards) ? [null] : $guards; - - foreach ($guards as $guard) { - if (Auth::guard($guard)->check()) { - return redirect(RouteServiceProvider::HOME); - } - } - - return $next($request); + return RouteServiceProvider::HOME; } } From 19dc36718ee9f4449025b21d6f32733b50920a70 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 14:02:00 -0500 Subject: [PATCH 006/186] remove trust proxies from skeleton --- app/Http/Kernel.php | 2 +- app/Http/Middleware/TrustProxies.php | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 app/Http/Middleware/TrustProxies.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 494c0501b13..9b1a6b7233a 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -15,7 +15,7 @@ class Kernel extends HttpKernel */ protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, - \App\Http\Middleware\TrustProxies::class, + \Illuminate\Http\Middleware\TrustProxies::class, \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php deleted file mode 100644 index 3391630ecc9..00000000000 --- a/app/Http/Middleware/TrustProxies.php +++ /dev/null @@ -1,28 +0,0 @@ -|string|null - */ - protected $proxies; - - /** - * The headers that should be used to detect proxies. - * - * @var int - */ - protected $headers = - Request::HEADER_X_FORWARDED_FOR | - Request::HEADER_X_FORWARDED_HOST | - Request::HEADER_X_FORWARDED_PORT | - Request::HEADER_X_FORWARDED_PROTO | - Request::HEADER_X_FORWARDED_AWS_ELB; -} From 902d79c9cfdc716dd8efe547746426465f580032 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 14:05:49 -0500 Subject: [PATCH 007/186] remove trust hosts from skeleton --- app/Http/Kernel.php | 2 +- app/Http/Middleware/TrustHosts.php | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 app/Http/Middleware/TrustHosts.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 9b1a6b7233a..c9c39e9d7f9 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -14,7 +14,7 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ - // \App\Http\Middleware\TrustHosts::class, + // \Illuminate\Http\Middleware\TrustHosts::class, \Illuminate\Http\Middleware\TrustProxies::class, \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php deleted file mode 100644 index c9c58bddcea..00000000000 --- a/app/Http/Middleware/TrustHosts.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - public function hosts(): array - { - return [ - $this->allSubdomainsOfApplicationUrl(), - ]; - } -} From 2f93bb17c19f9cc085450072cd502f09d96fef2e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 16:29:16 -0500 Subject: [PATCH 008/186] use base validate signature middleware --- app/Http/Kernel.php | 68 ----------------------- app/Http/Middleware/ValidateSignature.php | 22 -------- 2 files changed, 90 deletions(-) delete mode 100644 app/Http/Kernel.php delete mode 100644 app/Http/Middleware/ValidateSignature.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index c9c39e9d7f9..00000000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ - protected $middleware = [ - // \Illuminate\Http\Middleware\TrustHosts::class, - \Illuminate\Http\Middleware\TrustProxies::class, - \Illuminate\Http\Middleware\HandleCors::class, - \App\Http\Middleware\PreventRequestsDuringMaintenance::class, - \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, - \App\Http\Middleware\TrimStrings::class, - \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - ]; - - /** - * The application's route middleware groups. - * - * @var array> - */ - protected $middlewareGroups = [ - 'web' => [ - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - - 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - ]; - - /** - * The application's middleware aliases. - * - * Aliases may be used instead of class names to conveniently assign middleware to routes and groups. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, - 'signed' => \App\Http\Middleware\ValidateSignature::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - ]; -} diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php deleted file mode 100644 index 093bf64af81..00000000000 --- a/app/Http/Middleware/ValidateSignature.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - protected $except = [ - // 'fbclid', - // 'utm_campaign', - // 'utm_content', - // 'utm_medium', - // 'utm_source', - // 'utm_term', - ]; -} From 9749858beda75653793bc386b10455ca77eda5ac Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 14:25:59 -0500 Subject: [PATCH 009/186] rename csrf middleware for consistency --- app/Http/Middleware/ValidateCsrfToken.php | 17 +++++++++++++++++ app/Http/Middleware/VerifyCsrfToken.php | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 app/Http/Middleware/ValidateCsrfToken.php delete mode 100644 app/Http/Middleware/VerifyCsrfToken.php diff --git a/app/Http/Middleware/ValidateCsrfToken.php b/app/Http/Middleware/ValidateCsrfToken.php new file mode 100644 index 00000000000..e87f7208880 --- /dev/null +++ b/app/Http/Middleware/ValidateCsrfToken.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php deleted file mode 100644 index 9e86521722b..00000000000 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} From 49fc45c11c9260c3b1eee1af4cd4ebdf39fe44c5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 14:28:11 -0500 Subject: [PATCH 010/186] update sanctums use of csrf middleware --- config/sanctum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/sanctum.php b/config/sanctum.php index 529cfdc9916..b499d7516bd 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -60,7 +60,7 @@ */ 'middleware' => [ - 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, + 'validate_csrf_token' => App\Http\Middleware\ValidateCsrfToken::class, 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, ], From d001b6e504a81d884403880dd00c6ce04462528a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 14:34:27 -0500 Subject: [PATCH 011/186] use base encrypt cookies and trim strings middleware --- app/Http/Middleware/EncryptCookies.php | 17 ----------------- app/Http/Middleware/TrimStrings.php | 19 ------------------- 2 files changed, 36 deletions(-) delete mode 100644 app/Http/Middleware/EncryptCookies.php delete mode 100644 app/Http/Middleware/TrimStrings.php diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php deleted file mode 100644 index 867695bdcff..00000000000 --- a/app/Http/Middleware/EncryptCookies.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 88cadcaaf28..00000000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ - protected $except = [ - 'current_password', - 'password', - 'password_confirmation', - ]; -} From b6b6bee0111e749ce68b48ffa11691c579c36536 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 15:09:18 -0500 Subject: [PATCH 012/186] no longer necessary to load commands manually --- app/Console/Kernel.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index e6b9960ec1b..f88ec24bd70 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -20,8 +20,6 @@ protected function schedule(Schedule $schedule): void */ protected function commands(): void { - $this->load(__DIR__.'/Commands'); - require base_path('routes/console.php'); } } From d257a944fb8208815cc871b2bfd370e3e2457983 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 15:19:13 -0500 Subject: [PATCH 013/186] move commands in console kernel - remove console routes file --- app/Console/Kernel.php | 6 +++++- routes/console.php | 19 ------------------- 2 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 routes/console.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index f88ec24bd70..5566268dd89 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -4,6 +4,8 @@ use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use Illuminate\Foundation\Inspiring; +use Illuminate\Support\Facades\Artisan; class Kernel extends ConsoleKernel { @@ -20,6 +22,8 @@ protected function schedule(Schedule $schedule): void */ protected function commands(): void { - require base_path('routes/console.php'); + Artisan::command('inspire', function () { + $this->comment(Inspiring::quote()); + })->purpose('Display an inspiring quote'); } } diff --git a/routes/console.php b/routes/console.php deleted file mode 100644 index e05f4c9a1b2..00000000000 --- a/routes/console.php +++ /dev/null @@ -1,19 +0,0 @@ -comment(Inspiring::quote()); -})->purpose('Display an inspiring quote'); From 1de2011eafa3825956cab21b8e8e3a2fc8e9c0e3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 15:14:54 -0500 Subject: [PATCH 014/186] use base maintenance middleware --- .../PreventRequestsDuringMaintenance.php | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 app/Http/Middleware/PreventRequestsDuringMaintenance.php diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php deleted file mode 100644 index 74cbd9a9eaa..00000000000 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} From cdb66675998fca0fe32b84bdc650425d43d44707 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 15:53:25 -0500 Subject: [PATCH 015/186] clean up bootstrap - remove exception handler --- app/Exceptions/Handler.php | 30 ------------------------- bootstrap/app.php | 45 +++----------------------------------- 2 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 app/Exceptions/Handler.php diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php deleted file mode 100644 index 56af26405d4..00000000000 --- a/app/Exceptions/Handler.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ - protected $dontFlash = [ - 'current_password', - 'password', - 'password_confirmation', - ]; - - /** - * Register the exception handling callbacks for the application. - */ - public function register(): void - { - $this->reportable(function (Throwable $e) { - // - }); - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17df03b..0d438d29c33 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,5 +1,7 @@ singleton( - Illuminate\Contracts\Http\Kernel::class, - App\Http\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Console\Kernel::class, - App\Console\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class -); - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; +return Application::create()->withExceptionHandling(); From aac31bc8756cb2841cb8b8c0ea11d1f8a841d259 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 16:06:39 -0500 Subject: [PATCH 016/186] fix comment --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 0d438d29c33..88e197e64be 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -9,7 +9,7 @@ | | The first thing we will do is create a new Laravel application instance | which serves as the "glue" for all the components of Laravel, and is -| the IoC container for the system binding all of the various parts. +| the service container that can resolve all classes and components. | */ From b222e08189dc0297b24f001cb013104806e76ccf Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 16:20:41 -0500 Subject: [PATCH 017/186] pass an exception handler callbacklara --- bootstrap/app.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 88e197e64be..897fa4c3651 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -13,4 +13,7 @@ | */ -return Application::create()->withExceptionHandling(); +return Application::create() + ->withExceptionHandling(function ($handler) { + // + }); From e28f4b23ba5a87ef67b0cc809c62efc14428c5de Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 16:24:17 -0500 Subject: [PATCH 018/186] import class in database seeder --- database/seeders/DatabaseSeeder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a9f4519fce3..3aa30cf6fa0 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,6 +2,7 @@ namespace Database\Seeders; +use App\Models\User; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; @@ -12,9 +13,9 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - // \App\Models\User::factory(10)->create(); + // User::factory(10)->create(); - // \App\Models\User::factory()->create([ + // User::factory()->create([ // 'name' => 'Test User', // 'email' => 'test@example.com', // ]); From dee230455b90c37f1add0f22253e20c628625b63 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 May 2023 14:27:01 -0500 Subject: [PATCH 019/186] rename migrations --- ... 0001_01_01_000000_create_users_table.php} | 7 ++++ ...000_create_password_reset_tokens_table.php | 28 ---------------- ..._08_19_000000_create_failed_jobs_table.php | 32 ------------------ ...01_create_personal_access_tokens_table.php | 33 ------------------- 4 files changed, 7 insertions(+), 93 deletions(-) rename database/migrations/{2014_10_12_000000_create_users_table.php => 0001_01_01_000000_create_users_table.php} (72%) delete mode 100644 database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php delete mode 100644 database/migrations/2019_08_19_000000_create_failed_jobs_table.php delete mode 100644 database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php similarity index 72% rename from database/migrations/2014_10_12_000000_create_users_table.php rename to database/migrations/0001_01_01_000000_create_users_table.php index 444fafb7f53..9e22f06d70e 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -20,6 +20,12 @@ public function up(): void $table->rememberToken(); $table->timestamps(); }); + + Schema::create('password_reset_tokens', function (Blueprint $table) { + $table->string('email')->primary(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); } /** @@ -28,5 +34,6 @@ public function up(): void public function down(): void { Schema::dropIfExists('users'); + Schema::dropIfExists('password_reset_tokens'); } }; diff --git a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php deleted file mode 100644 index 81a7229b085..00000000000 --- a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('email')->primary(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('password_reset_tokens'); - } -}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php deleted file mode 100644 index 249da8171ac..00000000000 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('uuid')->unique(); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('failed_jobs'); - } -}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index e828ad8189e..00000000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('personal_access_tokens'); - } -}; From 9ac2d889c20d7ef50d5ad0d467df8fb8dcb77cc6 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 14:44:25 -0500 Subject: [PATCH 020/186] update comment regarding failed job drivers --- config/queue.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/queue.php b/config/queue.php index 01c6b054d48..55288fc9396 100644 --- a/config/queue.php +++ b/config/queue.php @@ -95,8 +95,10 @@ |-------------------------------------------------------------------------- | | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. + | can control how and where failed jobs are stored. Laravel ships with + | support for storing failed jobs in a simple file or in a database. + | + | Supported drivers: "database-uuids", "dynamodb", "file", "null" | */ From ec12d805da26ce5e50c182d04d85824c7f7c3438 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 16:08:23 -0500 Subject: [PATCH 021/186] use file driver for failed jobs in new applications --- config/queue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/queue.php b/config/queue.php index 55288fc9396..e71cec2bd90 100644 --- a/config/queue.php +++ b/config/queue.php @@ -103,7 +103,7 @@ */ 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'driver' => env('QUEUE_FAILED_DRIVER', 'file'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], From 91c813056f8723e935c9cb669053f71213ead6c8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 16:39:56 -0500 Subject: [PATCH 022/186] remove csrf middleware from skeleton --- app/Http/Middleware/ValidateCsrfToken.php | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 app/Http/Middleware/ValidateCsrfToken.php diff --git a/app/Http/Middleware/ValidateCsrfToken.php b/app/Http/Middleware/ValidateCsrfToken.php deleted file mode 100644 index e87f7208880..00000000000 --- a/app/Http/Middleware/ValidateCsrfToken.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} From f3a7b1df7d820e905af31c5061ffe7b78f7fd745 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 16:41:11 -0500 Subject: [PATCH 023/186] update sanctum configuration for middleware changes --- config/sanctum.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/sanctum.php b/config/sanctum.php index b499d7516bd..e41a19bfd00 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -2,6 +2,9 @@ use Laravel\Sanctum\Sanctum; +use Illuminate\Cookie\Middleware\EncryptCookies; +use Illuminate\Foundation\Http\Middleware\ValidateCsrfToke; + return [ /* @@ -60,8 +63,8 @@ */ 'middleware' => [ - 'validate_csrf_token' => App\Http\Middleware\ValidateCsrfToken::class, - 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, + 'validate_csrf_token' => ValidateCsrfToken::class, + 'encrypt_cookies' => EncryptCookies::class, ], ]; From 8b2ff6093001a65e35e8d153ab09fb1bdeaa1ac1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 16:50:07 -0500 Subject: [PATCH 024/186] remove two traits from base controller --- app/Http/Controllers/Controller.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 77ec359ab4d..3584dcdb8bf 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,11 +2,9 @@ namespace App\Http\Controllers; -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; -use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { - use AuthorizesRequests, ValidatesRequests; + // } From cf639e757adf8f670099c6af2eda7eba58dadd6c Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 11 May 2023 18:32:52 +0000 Subject: [PATCH 025/186] Apply fixes from StyleCI --- config/sanctum.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/sanctum.php b/config/sanctum.php index e41a19bfd00..88f908085de 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -1,9 +1,8 @@ Date: Thu, 11 May 2023 15:00:39 -0500 Subject: [PATCH 026/186] use database by default for failed jobs - ship combined job migration --- config/queue.php | 2 +- .../0001_01_01_000001_create_jobs_table.php | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 database/migrations/0001_01_01_000001_create_jobs_table.php diff --git a/config/queue.php b/config/queue.php index e71cec2bd90..55288fc9396 100644 --- a/config/queue.php +++ b/config/queue.php @@ -103,7 +103,7 @@ */ 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'file'), + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], diff --git a/database/migrations/0001_01_01_000001_create_jobs_table.php b/database/migrations/0001_01_01_000001_create_jobs_table.php new file mode 100644 index 00000000000..cd80d421380 --- /dev/null +++ b/database/migrations/0001_01_01_000001_create_jobs_table.php @@ -0,0 +1,43 @@ +id(); + $table->string('queue')->index(); + $table->longText('payload'); + $table->unsignedTinyInteger('attempts'); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + }); + + Schema::create('failed_jobs', function (Blueprint $table) { + $table->id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('jobs'); + Schema::dropIfExists('failed_jobs'); + } +}; From 96c4e20c082db1ecc3676808e8768754d3900056 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 15:40:40 -0500 Subject: [PATCH 027/186] uncomment test user --- database/seeders/DatabaseSeeder.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 3aa30cf6fa0..d01a0ef2f7f 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,9 +15,9 @@ public function run(): void { // User::factory(10)->create(); - // User::factory()->create([ - // 'name' => 'Test User', - // 'email' => 'test@example.com', - // ]); + User::factory()->create([ + 'name' => 'Test User', + 'email' => 'test@example.com', + ]); } } From 30beecd93ab00d0893a08cfaa3dbb68f76de4b82 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 11 May 2023 21:28:12 +0100 Subject: [PATCH 028/186] Update DatabaseSeeder.php --- database/seeders/DatabaseSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index d01a0ef2f7f..0f4dd8fee66 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,7 +2,7 @@ namespace Database\Seeders; -use App\Models\User; +// use App\Models\User; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; From 953895ae8986b227ff2d37c7955d147f52e060d6 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 15:41:08 -0500 Subject: [PATCH 029/186] uncomment import --- database/seeders/DatabaseSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 0f4dd8fee66..d01a0ef2f7f 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,7 +2,7 @@ namespace Database\Seeders; -// use App\Models\User; +use App\Models\User; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; From c0385edb68a5b69036822919c1acd06393a99ebe Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 15:53:21 -0500 Subject: [PATCH 030/186] update doc block for broadcast service provider --- app/Providers/BroadcastServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 092c8bdeea4..b4ec755177e 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -8,7 +8,7 @@ class BroadcastServiceProvider extends ServiceProvider { /** - * Bootstrap any application services. + * Bootstrap event broadcasting services. */ public function boot(): void { From 0ab10ce880c9017eba2d7aed9beebf2ff0bbb7a3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 22:35:40 -0500 Subject: [PATCH 031/186] use channel file... remove provider --- app/Providers/BroadcastServiceProvider.php | 21 --------------------- bootstrap/app.php | 1 + config/app.php | 1 - routes/channels.php | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+), 22 deletions(-) delete mode 100644 app/Providers/BroadcastServiceProvider.php create mode 100644 routes/channels.php diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index b4ec755177e..00000000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,21 +0,0 @@ -id === (int) $id; - }); - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index 897fa4c3651..b49a7c6236f 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -14,6 +14,7 @@ */ return Application::create() + ->withBroadcasting() ->withExceptionHandling(function ($handler) { // }); diff --git a/config/app.php b/config/app.php index 4c231b47d32..53b8e570ca8 100644 --- a/config/app.php +++ b/config/app.php @@ -165,7 +165,6 @@ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, ])->toArray(), diff --git a/routes/channels.php b/routes/channels.php new file mode 100644 index 00000000000..5d451e1fae8 --- /dev/null +++ b/routes/channels.php @@ -0,0 +1,18 @@ +id === (int) $id; +}); From b32ffa586373b0a44f27873b5db50c111a50ee82 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 22:37:40 -0500 Subject: [PATCH 032/186] Update config/sanctum.php Co-authored-by: Dinh Quoc Han --- config/sanctum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/sanctum.php b/config/sanctum.php index 88f908085de..2b34787d792 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -1,7 +1,7 @@ Date: Sat, 13 May 2023 15:16:48 -0500 Subject: [PATCH 033/186] remove event and auth service providers --- app/Providers/AuthServiceProvider.php | 17 ----------------- app/Providers/EventServiceProvider.php | 24 ------------------------ config/app.php | 3 +-- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 app/Providers/AuthServiceProvider.php delete mode 100644 app/Providers/EventServiceProvider.php diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php deleted file mode 100644 index ddf609011fa..00000000000 --- a/app/Providers/AuthServiceProvider.php +++ /dev/null @@ -1,17 +0,0 @@ -toArray(), From 0511332711410b914a6dab2860bf7801317be718 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 12:11:09 -0500 Subject: [PATCH 034/186] remove event service provider from config - auto registered now --- config/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/config/app.php b/config/app.php index 9a9092d8e28..52c4741a15d 100644 --- a/config/app.php +++ b/config/app.php @@ -164,7 +164,6 @@ * Application Service Providers... */ App\Providers\AppServiceProvider::class, - Illuminate\Foundation\Support\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, ])->toArray(), From 028ba7c15bd074ef4daf61d3493afba254cf6942 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 16:17:18 -0500 Subject: [PATCH 035/186] update providers config to be more robust for replacements --- config/app.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/config/app.php b/config/app.php index 52c4741a15d..978a022198e 100644 --- a/config/app.php +++ b/config/app.php @@ -149,22 +149,20 @@ | Autoloaded Service Providers |-------------------------------------------------------------------------- | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. + | The service providers listed here will be automatically loaded on any + | requests to your application. You may add your own services to the + | arrays below to provide additional features to this application. | */ 'providers' => ServiceProvider::defaultProviders()->merge([ - /* - * Package Service Providers... - */ - - /* - * Application Service Providers... - */ + // Package Service Providers... + ])->merge([ + // Application Service Providers... App\Providers\AppServiceProvider::class, App\Providers\RouteServiceProvider::class, + ])->merge([ + // Added Service Providers (Do not remove this line)... ])->toArray(), /* From c65ae53a13c6d36aca97ba617b55df4c18e05439 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 16:44:28 -0500 Subject: [PATCH 036/186] route service provider no longer necessary. bootstrap --- app/Providers/RouteServiceProvider.php | 40 -------------------------- bootstrap/app.php | 5 ++++ config/app.php | 2 +- 3 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 app/Providers/RouteServiceProvider.php diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php deleted file mode 100644 index 1cf5f15c226..00000000000 --- a/app/Providers/RouteServiceProvider.php +++ /dev/null @@ -1,40 +0,0 @@ -by($request->user()?->id ?: $request->ip()); - }); - - $this->routes(function () { - Route::middleware('api') - ->prefix('api') - ->group(base_path('routes/api.php')); - - Route::middleware('web') - ->group(base_path('routes/web.php')); - }); - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index b49a7c6236f..b47fc8a31bd 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,6 +1,7 @@ withBroadcasting() + ->withRouting( + web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', + ) ->withExceptionHandling(function ($handler) { // }); diff --git a/config/app.php b/config/app.php index 978a022198e..11f69c1ef14 100644 --- a/config/app.php +++ b/config/app.php @@ -160,7 +160,7 @@ ])->merge([ // Application Service Providers... App\Providers\AppServiceProvider::class, - App\Providers\RouteServiceProvider::class, + // App\Providers\RouteServiceProvider::class, ])->merge([ // Added Service Providers (Do not remove this line)... ])->toArray(), From 4e8f7d6e3943a98734fe157b9f13df529ff2dc54 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 16:48:04 -0500 Subject: [PATCH 037/186] remove commented service provider --- config/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/config/app.php b/config/app.php index 11f69c1ef14..786b5db4e8c 100644 --- a/config/app.php +++ b/config/app.php @@ -160,7 +160,6 @@ ])->merge([ // Application Service Providers... App\Providers\AppServiceProvider::class, - // App\Providers\RouteServiceProvider::class, ])->merge([ // Added Service Providers (Do not remove this line)... ])->toArray(), From efe26cfdc0697a581620ff3258cfe23eac906619 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 19 May 2023 16:09:18 -0500 Subject: [PATCH 038/186] console kernel not needed... console routes file can define schedule --- app/Console/Kernel.php | 29 ----------------------------- routes/console.php | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 29 deletions(-) delete mode 100644 app/Console/Kernel.php create mode 100644 routes/console.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index 5566268dd89..00000000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,29 +0,0 @@ -command('inspire')->hourly(); - } - - /** - * Register the commands for the application. - */ - protected function commands(): void - { - Artisan::command('inspire', function () { - $this->comment(Inspiring::quote()); - })->purpose('Display an inspiring quote'); - } -} diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 00000000000..6805475edfb --- /dev/null +++ b/routes/console.php @@ -0,0 +1,33 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote'); + +/* +|-------------------------------------------------------------------------- +| Console Schedule +|-------------------------------------------------------------------------- +| +| Below you may define your scheduled tasks, including console commands +| or system commands. These tasks will be run automatically when due +| using Laravel's built-in "schedule:run" Artisan console command. +| +*/ + +Schedule::command('inspire')->hourly(); From c110b45fda69b267fce4eaf876be23e86afe013d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 21 May 2023 12:27:03 -0500 Subject: [PATCH 039/186] update to use app builder --- bootstrap/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b47fc8a31bd..30c8c7fe165 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -14,7 +14,7 @@ | */ -return Application::create() +return Application::configure() ->withBroadcasting() ->withRouting( web: __DIR__.'/../routes/web.php', @@ -22,4 +22,4 @@ ) ->withExceptionHandling(function ($handler) { // - }); + })->create(); From d949b5b5bb1941281ac16102f926f615dc59e286 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 21 May 2023 12:27:41 -0500 Subject: [PATCH 040/186] remove unnecessary import --- bootstrap/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 30c8c7fe165..a8c11dd19b6 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,7 +1,6 @@ Date: Sun, 21 May 2023 15:32:26 -0500 Subject: [PATCH 041/186] http kernel is no longer necessary --- bootstrap/app.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index a8c11dd19b6..5bc7833ce84 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,6 +1,8 @@ withExceptionHandling(function ($handler) { + ->withMiddleware(function (Middleware $middleware) { + // + }) + ->withExceptionHandling(function (ExceptionHandler $handler) { // })->create(); From 0049546bd24e8c57baee5024f2ef9e49c116a88c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 14:57:42 -0500 Subject: [PATCH 042/186] update comment --- bootstrap/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 5bc7833ce84..2a5f46c8779 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -10,8 +10,8 @@ |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance -| which serves as the "glue" for all the components of Laravel, and is -| the service container that can resolve all classes and components. +| which serves as the "glue" for all the components of Laravel. We can +| also use the application to configure core, foundational behavior. | */ From d1f5cc05eb93fcfee8c6bab7e9a97fcc14894b96 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:09:39 -0500 Subject: [PATCH 043/186] streamline incoming request / cli files --- artisan | 31 +++++++------------------------ bootstrap/app.php | 2 +- public/index.php | 8 +------- 3 files changed, 9 insertions(+), 32 deletions(-) diff --git a/artisan b/artisan index 67a3329b183..be54681972c 100755 --- a/artisan +++ b/artisan @@ -1,6 +1,8 @@ #!/usr/bin/env php make(Illuminate\Contracts\Console\Kernel::class); - -$status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\ConsoleOutput -); - -/* -|-------------------------------------------------------------------------- -| Shutdown The Application -|-------------------------------------------------------------------------- -| -| Once Artisan has finished running, we will fire off the shutdown events -| so that any final work may be done by the application before we shut -| down the process. This is the last thing to happen to the request. -| -*/ +$app = require_once __DIR__.'/bootstrap/app.php'; -$kernel->terminate($input, $status); +$status = $app->handleCommand(new ArgvInput); exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php index 2a5f46c8779..c67001b837e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,8 +1,8 @@ make(Kernel::class); - -$response = $kernel->handle( - $request = Request::capture() -)->send(); - -$kernel->terminate($request, $response); +$app->handleRequest(Request::capture()); From d2efa3ef8b41734308b70bec12c8870b1ada99aa Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:13:13 -0500 Subject: [PATCH 044/186] update comment --- artisan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artisan b/artisan index be54681972c..ac5f437d464 100755 --- a/artisan +++ b/artisan @@ -24,8 +24,8 @@ require __DIR__.'/vendor/autoload.php'; |-------------------------------------------------------------------------- | | When we run the console application, the current CLI command will be -| executed in this console and the response sent back to a terminal -| or another output device for the developers. Here goes nothing! +| executed by an Artisan command and the exit code is given back to +| the caller. Once the command is handled, the script terminates. | */ From 781a49b08581f454c8a548f53b52fb8c42908729 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:26:52 -0500 Subject: [PATCH 045/186] app config comment review --- config/app.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/app.php b/config/app.php index 786b5db4e8c..560db221b01 100644 --- a/config/app.php +++ b/config/app.php @@ -10,7 +10,7 @@ | Application Name |-------------------------------------------------------------------------- | - | This value is the name of your application. This value is used when the + | This value is the name of your application, which will be used when the | framework needs to place the application's name in a notification or | any other location as required by the application or its packages. | @@ -65,8 +65,8 @@ |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. + | will be used by the PHP date and date-time functions. The timezone + | is set to "UTC" by default as it is suitable for most use cases. | */ @@ -116,9 +116,9 @@ | Encryption Key |-------------------------------------------------------------------------- | - | This key is used by the Illuminate encrypter service and should be set + | This key is utilized by Laravel's encryption services and shold be set | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! + | will not be safe. Please do this before deploying an application. | */ From ea609dcde7dd6abd564481c98763fcf2398c696e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:30:13 -0500 Subject: [PATCH 046/186] auth config file comments --- config/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/auth.php b/config/auth.php index 9548c15de94..08318505acf 100644 --- a/config/auth.php +++ b/config/auth.php @@ -25,7 +25,7 @@ | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. + | which utilizes session storage plus the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage @@ -105,7 +105,7 @@ |-------------------------------------------------------------------------- | | Here you may define the amount of seconds before a password confirmation - | times out and the user is prompted to re-enter their password via the + | window expires and users are asked to re-enter their password via the | confirmation screen. By default, the timeout lasts for three hours. | */ From bf776fd64c91d525cd343434a4dec4409aecf3ec Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:32:43 -0500 Subject: [PATCH 047/186] cache config file comments --- config/cache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/cache.php b/config/cache.php index d4171e2212c..1b1e6a1a8cf 100644 --- a/config/cache.php +++ b/config/cache.php @@ -9,9 +9,9 @@ | Default Cache Store |-------------------------------------------------------------------------- | - | This option controls the default cache connection that gets used while - | using this caching library. This connection is used when another is - | not explicitly specified when executing a given caching function. + | This option controls the default cache store that will be used by the + | framework. This connection is utilized if another isn't explicitly + | specified when running a cache operation inside the application. | */ From bd642792e9370c5ae512a1c51f650d50e62087cb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:34:32 -0500 Subject: [PATCH 048/186] database file comments --- config/database.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/config/database.php b/config/database.php index 137ad18ce38..d69c4aef26c 100644 --- a/config/database.php +++ b/config/database.php @@ -11,7 +11,7 @@ | | Here you may specify which of the database connections below you wish | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. + | you may use many connections at once throughout the application. | */ @@ -24,12 +24,7 @@ | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. + | supported by Laravel is shown below to assist your development. | */ From a597f64ccbdef56e6f116db2e21ebcadd7f77ea6 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:35:09 -0500 Subject: [PATCH 049/186] filesystem comments --- config/filesystems.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filesystems.php b/config/filesystems.php index e9d9dbdbe8a..21ad5c8bdb4 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -9,7 +9,7 @@ | | Here you may specify the default filesystem disk that should be used | by the framework. The "local" disk, as well as a variety of cloud - | based disks are available to your application. Just store away! + | based disks are available to your application for file storage. | */ From 7d045519c67735560b27dc553998d538714f6fcb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:39:03 -0500 Subject: [PATCH 050/186] mail config comments --- config/mail.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/mail.php b/config/mail.php index f32d5609c16..6ae6b79116f 100644 --- a/config/mail.php +++ b/config/mail.php @@ -25,7 +25,7 @@ | you and you are free to add your own as your application requires. | | Laravel supports a variety of mail "transport" drivers to be used while - | sending an e-mail. You will specify which one you are using for your + | delivering an email. You may specify which one you're using for your | mailers below. You are free to add additional mailers as required. | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", @@ -93,9 +93,9 @@ | Global "From" Address |-------------------------------------------------------------------------- | - | You may wish for all e-mails sent by your application to be sent from + | You may wish for all emails sent by your application to be sent from | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. + | used globally for all emails that are sent by your application. | */ From 5868bd6d712d6e2035a126acbc79dae431b0a774 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:39:45 -0500 Subject: [PATCH 051/186] mail config comments --- config/mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/mail.php b/config/mail.php index 6ae6b79116f..f21e8e70b4f 100644 --- a/config/mail.php +++ b/config/mail.php @@ -94,7 +94,7 @@ |-------------------------------------------------------------------------- | | You may wish for all emails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is + | the same address. Here you may specify a name and address that is | used globally for all emails that are sent by your application. | */ From 84bac68d40d9bdafa311acae68b987ca28d83f6a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 31 May 2023 10:41:48 -0500 Subject: [PATCH 052/186] use named route instead of constant --- app/Http/Middleware/RedirectIfAuthenticated.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index e67219c833c..7ef6e8bfa90 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -2,7 +2,6 @@ namespace App\Http\Middleware; -use App\Providers\RouteServiceProvider; use Illuminate\Auth\Middleware\RedirectIfAuthenticated as Middleware; use Illuminate\Http\Request; @@ -13,6 +12,6 @@ class RedirectIfAuthenticated extends Middleware */ protected function redirectTo(Request $request): ?string { - return RouteServiceProvider::HOME; + return route('dashboard'); } } From d1745f990a99a58d19f36a3580dac4811a00b680 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 31 May 2023 10:57:28 -0500 Subject: [PATCH 053/186] updating comments --- config/session.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/config/session.php b/config/session.php index 8fed97c0141..6593a7ec900 100644 --- a/config/session.php +++ b/config/session.php @@ -9,9 +9,9 @@ | Default Session Driver |-------------------------------------------------------------------------- | - | This option controls the default session "driver" that will be used on - | requests. By default, we will use the lightweight native driver but - | you may specify any of the other wonderful drivers provided here. + | This option controls the default session "driver" that will be used by + | incoming requests. Laravel supports a variety of storage drivers to + | choose from for session storage. File storage is used by default. | | Supported: "file", "cookie", "database", "apc", | "memcached", "redis", "dynamodb", "array" @@ -27,7 +27,8 @@ | | Here you may specify the number of minutes that you wish the session | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. + | to expire immediately when the browser is closed then you may + | indicate that via the expire_on_close configuration option. | */ @@ -41,8 +42,8 @@ |-------------------------------------------------------------------------- | | This option allows you to easily specify that all of your session data - | should be encrypted before it is stored. All encryption will be run - | automatically by Laravel and you can use the Session like normal. + | should be encrypted before it's stored. All encryption is performed + | automatically by Laravel and you may use the session like normal. | */ @@ -53,7 +54,7 @@ | Session File Location |-------------------------------------------------------------------------- | - | When using the native session driver, we need a location where session + | When utilizing the "file" session driver, we need a spot where session | files may be stored. A default has been set for you but a different | location may be specified. This is only needed for file sessions. | From 4511b38600b9d442a21ebe20134351d2297690e9 Mon Sep 17 00:00:00 2001 From: Miguel Piedrafita Date: Fri, 2 Jun 2023 15:00:55 +0200 Subject: [PATCH 054/186] fix typo in app.php (#6189) * fix typo in app.php * Update app.php --------- Co-authored-by: Taylor Otwell --- config/app.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/app.php b/config/app.php index 560db221b01..f18082faab9 100644 --- a/config/app.php +++ b/config/app.php @@ -116,9 +116,9 @@ | Encryption Key |-------------------------------------------------------------------------- | - | This key is utilized by Laravel's encryption services and shold be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application. + | This key is utilized by Laravel's encryption services and should be set + | to a random, 32 character string; otherwise, these encrypted strings + | will not be safe. Please do this before deploying the application. | */ From 2d38232ec7c7a955b354cbdacf2195911300b131 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 16:49:15 -0500 Subject: [PATCH 055/186] pass channels in routing --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index c67001b837e..d8998ee04d3 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -16,10 +16,10 @@ */ return Application::configure() - ->withBroadcasting() ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', + channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // From 02d2e61b708d9d19efed60e1ba692f06c78be129 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 16:57:48 -0500 Subject: [PATCH 056/186] register commands --- bootstrap/app.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/app.php b/bootstrap/app.php index d8998ee04d3..723a4795dc6 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,6 +19,7 @@ ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { From e8e893a3871bd0eb8c2231358824646457b49309 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 20:31:56 -0500 Subject: [PATCH 057/186] pass default command directory --- bootstrap/app.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap/app.php b/bootstrap/app.php index 723a4795dc6..3a2be0ea1ee 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -25,6 +25,9 @@ ->withMiddleware(function (Middleware $middleware) { // }) + ->withCommandsIn([ + __DIR__.'/../app/Console/Commands', + ]) ->withExceptionHandling(function (ExceptionHandler $handler) { // })->create(); From a49cb391cdf2b79635798921bc06b5abb73ad2ae Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 20:35:56 -0500 Subject: [PATCH 058/186] update bootstrap for console commands --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 3a2be0ea1ee..68ac103f7cf 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -25,7 +25,7 @@ ->withMiddleware(function (Middleware $middleware) { // }) - ->withCommandsIn([ + ->withCommands([ __DIR__.'/../app/Console/Commands', ]) ->withExceptionHandling(function (ExceptionHandler $handler) { From d7b8d0a39a3bd3e05e0b844c59eaa3a9ed7ca128 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 21:00:50 -0500 Subject: [PATCH 059/186] initial stub of exceptions --- bootstrap/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 68ac103f7cf..c01ef771e43 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,7 +1,7 @@ withCommands([ __DIR__.'/../app/Console/Commands', ]) - ->withExceptionHandling(function (ExceptionHandler $handler) { + ->withExceptionHandling(function (Exceptions $exceptions) { // })->create(); From 627144243a876e9f90d69132a24ee082cc461225 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 11:07:13 -0500 Subject: [PATCH 060/186] pass command routes in withCommands --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index c01ef771e43..f68d79d2f8e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,13 +19,13 @@ ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', - commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // }) ->withCommands([ + __DIR__.'/../routes/console.php', __DIR__.'/../app/Console/Commands', ]) ->withExceptionHandling(function (Exceptions $exceptions) { From d0bd932cc0b0d7c27971e09173201e8d38a34529 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 12:25:46 -0500 Subject: [PATCH 061/186] update comment --- config/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index f18082faab9..f98b852a846 100644 --- a/config/app.php +++ b/config/app.php @@ -90,9 +90,9 @@ | Application Fallback Locale |-------------------------------------------------------------------------- | - | The fallback locale determines the locale to use when the current one + | The fallback locale determines the locale to use when the default one | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. + | the languages which are currently supported by your application. | */ From e68534d4e7fc72bd05b8a79ca345dbf27bb32f1f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 12:28:40 -0500 Subject: [PATCH 062/186] update comment --- config/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index f98b852a846..580f6b5c7f4 100644 --- a/config/app.php +++ b/config/app.php @@ -117,8 +117,8 @@ |-------------------------------------------------------------------------- | | This key is utilized by Laravel's encryption services and should be set - | to a random, 32 character string; otherwise, these encrypted strings - | will not be safe. Please do this before deploying the application. + | to a random, 32 character string or all of the encrypted strings are + | not secure. You should do this prior to deploying the application. | */ From 6b96b272a18149ad36b42416ed500b521e528028 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 12:30:08 -0500 Subject: [PATCH 063/186] update comment --- config/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index 580f6b5c7f4..b5cb3bd70b4 100644 --- a/config/app.php +++ b/config/app.php @@ -170,8 +170,8 @@ |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. + | is started. You may add any additional class aliases which should + | be loaded to the array. For speed, all aliases are lazy loaded. | */ From fbfea26d045b3e14decfb872e2bcc4db97f5a78d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 16:50:47 -0500 Subject: [PATCH 064/186] slim down commands --- bootstrap/app.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index f68d79d2f8e..b5947320916 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,15 +19,12 @@ ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // }) - ->withCommands([ - __DIR__.'/../routes/console.php', - __DIR__.'/../app/Console/Commands', - ]) ->withExceptionHandling(function (Exceptions $exceptions) { // })->create(); From fa9d53bb212e4cb57cf837f5d4c8d634248502c0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 16:56:27 -0500 Subject: [PATCH 065/186] slim exception method --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b5947320916..d8ede7aca88 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -25,6 +25,6 @@ ->withMiddleware(function (Middleware $middleware) { // }) - ->withExceptionHandling(function (Exceptions $exceptions) { + ->withExceptions(function (Exceptions $exceptions) { // })->create(); From 8ece0a3bed4714b63d7b7bc8cf82f245ff17ad9d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 17:12:51 -0500 Subject: [PATCH 066/186] update wording --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index d8ede7aca88..d9b42863a4c 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -10,7 +10,7 @@ |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance -| which serves as the "glue" for all the components of Laravel. We can +| which serves as the brain for all of the Laravel components. We will | also use the application to configure core, foundational behavior. | */ From c9e43fbcb6253c36398ac862dbb461933322807c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 7 Jun 2023 11:35:25 -0500 Subject: [PATCH 067/186] remove middleware that dont need to be in skeleton anymore --- app/Http/Middleware/Authenticate.php | 17 ----------------- app/Http/Middleware/RedirectIfAuthenticated.php | 17 ----------------- 2 files changed, 34 deletions(-) delete mode 100644 app/Http/Middleware/Authenticate.php delete mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 63a433e524f..00000000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,17 +0,0 @@ - Date: Wed, 7 Jun 2023 17:14:05 -0500 Subject: [PATCH 068/186] no need to extend any base controller --- app/Http/Controllers/Controller.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 3584dcdb8bf..88a4821d878 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,9 +2,7 @@ namespace App\Http\Controllers; -use Illuminate\Routing\Controller as BaseController; - -class Controller extends BaseController +class Controller { // } From 456a77e5eba9f2e391654654749a62c4ef46f547 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 17:48:19 -0500 Subject: [PATCH 069/186] fix env var names for cache and broadcast --- .env.example | 4 ++-- config/broadcasting.php | 2 +- config/cache.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index ea0665b0a60..324ff6ba339 100644 --- a/.env.example +++ b/.env.example @@ -15,8 +15,8 @@ DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD= -BROADCAST_DRIVER=log -CACHE_DRIVER=file +BROADCAST_CONNECTION=log +CACHE_STORE=file FILESYSTEM_DISK=local QUEUE_CONNECTION=sync SESSION_DRIVER=file diff --git a/config/broadcasting.php b/config/broadcasting.php index 2410485384e..c3e2934f1f9 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -15,7 +15,7 @@ | */ - 'default' => env('BROADCAST_DRIVER', 'null'), + 'default' => env('BROADCAST_CONNECTION', 'null'), /* |-------------------------------------------------------------------------- diff --git a/config/cache.php b/config/cache.php index 1b1e6a1a8cf..48b7bf7a850 100644 --- a/config/cache.php +++ b/config/cache.php @@ -15,7 +15,7 @@ | */ - 'default' => env('CACHE_DRIVER', 'file'), + 'default' => env('CACHE_STORE', 'file'), /* |-------------------------------------------------------------------------- From 6b2b71de7f6c746320d517a744d320413ff7ef12 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 17:50:34 -0500 Subject: [PATCH 070/186] let default queue driver be database --- .env.example | 2 +- config/queue.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 324ff6ba339..9209ee83803 100644 --- a/.env.example +++ b/.env.example @@ -18,7 +18,7 @@ DB_PASSWORD= BROADCAST_CONNECTION=log CACHE_STORE=file FILESYSTEM_DISK=local -QUEUE_CONNECTION=sync +QUEUE_CONNECTION=database SESSION_DRIVER=file SESSION_LIFETIME=120 diff --git a/config/queue.php b/config/queue.php index 55288fc9396..638cd3393c8 100644 --- a/config/queue.php +++ b/config/queue.php @@ -13,7 +13,7 @@ | */ - 'default' => env('QUEUE_CONNECTION', 'sync'), + 'default' => env('QUEUE_CONNECTION', 'database'), /* |-------------------------------------------------------------------------- From 1828c27d1b8f334f8b4334b4e61abb766dfe1bc5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 18:59:05 -0500 Subject: [PATCH 071/186] add more env vars --- .env.example | 8 ++++++++ config/app.php | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index 9209ee83803..7a7828052f6 100644 --- a/.env.example +++ b/.env.example @@ -2,8 +2,16 @@ APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true +APP_TIMEZONE=UTC APP_URL=http://localhost +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +APP_MAINTENANCE_STORE=redis + LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug diff --git a/config/app.php b/config/app.php index b5cb3bd70b4..381c4354a61 100644 --- a/config/app.php +++ b/config/app.php @@ -70,7 +70,7 @@ | */ - 'timezone' => 'UTC', + 'timezone' => env('APP_TIMEZONE', 'UTC'), /* |-------------------------------------------------------------------------- @@ -83,7 +83,7 @@ | */ - 'locale' => 'en', + 'locale' => env('APP_LOCALE', 'en'), /* |-------------------------------------------------------------------------- @@ -96,7 +96,7 @@ | */ - 'fallback_locale' => 'en', + 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), /* |-------------------------------------------------------------------------- @@ -109,7 +109,7 @@ | */ - 'faker_locale' => 'en_US', + 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), /* |-------------------------------------------------------------------------- @@ -140,8 +140,8 @@ */ 'maintenance' => [ - 'driver' => 'file', - // 'store' => 'redis', + 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), + 'store' => env('APP_MAINTENANCE_STORE', 'redis'), ], /* From 50bd9cb87622948d49d3fc1d03c7e9db69dd7fcb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 19:52:47 -0500 Subject: [PATCH 072/186] remove most config files by default --- .env.example | 1 + config/app.php | 155 ------------------------------ config/auth.php | 115 ----------------------- config/broadcasting.php | 71 -------------- config/cache.php | 111 ---------------------- config/cors.php | 34 ------- config/database.php | 146 ----------------------------- config/filesystems.php | 76 --------------- config/hashing.php | 52 ----------- config/logging.php | 131 -------------------------- config/mail.php | 126 ------------------------- config/queue.php | 111 ---------------------- config/services.php | 34 ------- config/session.php | 202 ---------------------------------------- config/view.php | 36 ------- 15 files changed, 1 insertion(+), 1400 deletions(-) delete mode 100644 config/auth.php delete mode 100644 config/broadcasting.php delete mode 100644 config/cache.php delete mode 100644 config/cors.php delete mode 100644 config/database.php delete mode 100644 config/filesystems.php delete mode 100644 config/hashing.php delete mode 100644 config/logging.php delete mode 100644 config/mail.php delete mode 100644 config/queue.php delete mode 100644 config/services.php delete mode 100644 config/session.php delete mode 100644 config/view.php diff --git a/.env.example b/.env.example index 7a7828052f6..535c2795eb5 100644 --- a/.env.example +++ b/.env.example @@ -13,6 +13,7 @@ APP_MAINTENANCE_DRIVER=file APP_MAINTENANCE_STORE=redis LOG_CHANNEL=stack +LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug diff --git a/config/app.php b/config/app.php index 381c4354a61..7717c62dc19 100644 --- a/config/app.php +++ b/config/app.php @@ -1,149 +1,9 @@ env('APP_NAME', 'Laravel'), - - /* - |-------------------------------------------------------------------------- - | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services the application utilizes. Set this in your ".env" file. - | - */ - - 'env' => env('APP_ENV', 'production'), - - /* - |-------------------------------------------------------------------------- - | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | - */ - - 'debug' => (bool) env('APP_DEBUG', false), - - /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | - */ - - 'url' => env('APP_URL', 'http://localhost'), - - 'asset_url' => env('ASSET_URL'), - - /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. The timezone - | is set to "UTC" by default as it is suitable for most use cases. - | - */ - - 'timezone' => env('APP_TIMEZONE', 'UTC'), - - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - - 'locale' => env('APP_LOCALE', 'en'), - - /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the default one - | is not available. You may change the value to correspond to any of - | the languages which are currently supported by your application. - | - */ - - 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), - - /* - |-------------------------------------------------------------------------- - | Faker Locale - |-------------------------------------------------------------------------- - | - | This locale will be used by the Faker PHP library when generating fake - | data for your database seeds. For example, this will be used to get - | localized telephone numbers, street address information and more. - | - */ - - 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), - - /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is utilized by Laravel's encryption services and should be set - | to a random, 32 character string or all of the encrypted strings are - | not secure. You should do this prior to deploying the application. - | - */ - - 'key' => env('APP_KEY'), - - 'cipher' => 'AES-256-CBC', - - /* - |-------------------------------------------------------------------------- - | Maintenance Mode Driver - |-------------------------------------------------------------------------- - | - | These configuration options determine the driver used to determine and - | manage Laravel's "maintenance mode" status. The "cache" driver will - | allow maintenance mode to be controlled across multiple machines. - | - | Supported drivers: "file", "cache" - | - */ - - 'maintenance' => [ - 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), - 'store' => env('APP_MAINTENANCE_STORE', 'redis'), - ], - /* |-------------------------------------------------------------------------- | Autoloaded Service Providers @@ -164,19 +24,4 @@ // Added Service Providers (Do not remove this line)... ])->toArray(), - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. You may add any additional class aliases which should - | be loaded to the array. For speed, all aliases are lazy loaded. - | - */ - - 'aliases' => Facade::defaultAliases()->merge([ - // 'Example' => App\Facades\Example::class, - ])->toArray(), - ]; diff --git a/config/auth.php b/config/auth.php deleted file mode 100644 index 08318505acf..00000000000 --- a/config/auth.php +++ /dev/null @@ -1,115 +0,0 @@ - [ - 'guard' => 'web', - 'passwords' => 'users', - ], - - /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | which utilizes session storage plus the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session" - | - */ - - 'guards' => [ - 'web' => [ - 'driver' => 'session', - 'provider' => 'users', - ], - ], - - /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | - */ - - 'providers' => [ - 'users' => [ - 'driver' => 'eloquent', - 'model' => App\Models\User::class, - ], - - // 'users' => [ - // 'driver' => 'database', - // 'table' => 'users', - // ], - ], - - /* - |-------------------------------------------------------------------------- - | Resetting Passwords - |-------------------------------------------------------------------------- - | - | You may specify multiple password reset configurations if you have more - | than one user table or model in the application and you want to have - | separate password reset settings based on the specific user types. - | - | The expiry time is the number of minutes that each reset token will be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | - | The throttle setting is the number of seconds a user must wait before - | generating more password reset tokens. This prevents the user from - | quickly generating a very large amount of password reset tokens. - | - */ - - 'passwords' => [ - 'users' => [ - 'provider' => 'users', - 'table' => 'password_reset_tokens', - 'expire' => 60, - 'throttle' => 60, - ], - ], - - /* - |-------------------------------------------------------------------------- - | Password Confirmation Timeout - |-------------------------------------------------------------------------- - | - | Here you may define the amount of seconds before a password confirmation - | window expires and users are asked to re-enter their password via the - | confirmation screen. By default, the timeout lasts for three hours. - | - */ - - 'password_timeout' => 10800, - -]; diff --git a/config/broadcasting.php b/config/broadcasting.php deleted file mode 100644 index c3e2934f1f9..00000000000 --- a/config/broadcasting.php +++ /dev/null @@ -1,71 +0,0 @@ - env('BROADCAST_CONNECTION', 'null'), - - /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | - */ - - 'connections' => [ - - 'pusher' => [ - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'secret' => env('PUSHER_APP_SECRET'), - 'app_id' => env('PUSHER_APP_ID'), - 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', - 'port' => env('PUSHER_PORT', 443), - 'scheme' => env('PUSHER_SCHEME', 'https'), - 'encrypted' => true, - 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', - ], - 'client_options' => [ - // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html - ], - ], - - 'ably' => [ - 'driver' => 'ably', - 'key' => env('ABLY_KEY'), - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - ], - - 'log' => [ - 'driver' => 'log', - ], - - 'null' => [ - 'driver' => 'null', - ], - - ], - -]; diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index 48b7bf7a850..00000000000 --- a/config/cache.php +++ /dev/null @@ -1,111 +0,0 @@ - env('CACHE_STORE', 'file'), - - /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | - | Supported drivers: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb", "octane", "null" - | - */ - - 'stores' => [ - - 'apc' => [ - 'driver' => 'apc', - ], - - 'array' => [ - 'driver' => 'array', - 'serialize' => false, - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'cache', - 'connection' => null, - 'lock_connection' => null, - ], - - 'file' => [ - 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), - 'lock_path' => storage_path('framework/cache/data'), - ], - - 'memcached' => [ - 'driver' => 'memcached', - 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ - env('MEMCACHED_USERNAME'), - env('MEMCACHED_PASSWORD'), - ], - 'options' => [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, - ], - 'servers' => [ - [ - 'host' => env('MEMCACHED_HOST', '127.0.0.1'), - 'port' => env('MEMCACHED_PORT', 11211), - 'weight' => 100, - ], - ], - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'cache', - 'lock_connection' => 'default', - ], - - 'dynamodb' => [ - 'driver' => 'dynamodb', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), - 'endpoint' => env('DYNAMODB_ENDPOINT'), - ], - - 'octane' => [ - 'driver' => 'octane', - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing the APC, database, memcached, Redis, or DynamoDB cache - | stores there might be other applications using the same cache. For - | that reason, you may prefix every cache key to avoid collisions. - | - */ - - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), - -]; diff --git a/config/cors.php b/config/cors.php deleted file mode 100644 index 8a39e6daa63..00000000000 --- a/config/cors.php +++ /dev/null @@ -1,34 +0,0 @@ - ['api/*', 'sanctum/csrf-cookie'], - - 'allowed_methods' => ['*'], - - 'allowed_origins' => ['*'], - - 'allowed_origins_patterns' => [], - - 'allowed_headers' => ['*'], - - 'exposed_headers' => [], - - 'max_age' => 0, - - 'supports_credentials' => false, - -]; diff --git a/config/database.php b/config/database.php deleted file mode 100644 index d69c4aef26c..00000000000 --- a/config/database.php +++ /dev/null @@ -1,146 +0,0 @@ - env('DB_CONNECTION', 'mysql'), - - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to assist your development. - | - */ - - 'connections' => [ - - 'sqlite' => [ - 'driver' => 'sqlite', - 'url' => env('DATABASE_URL'), - 'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'prefix' => '', - 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), - ], - - 'mysql' => [ - 'driver' => 'mysql', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'prefix' => '', - 'prefix_indexes' => true, - 'strict' => true, - 'engine' => null, - 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), - ]) : [], - ], - - 'pgsql' => [ - 'driver' => 'pgsql', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'prefix_indexes' => true, - 'search_path' => 'public', - 'sslmode' => 'prefer', - ], - - 'sqlsrv' => [ - 'driver' => 'sqlsrv', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'prefix_indexes' => true, - // 'encrypt' => env('DB_ENCRYPT', 'yes'), - // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | - */ - - 'migrations' => 'migrations', - - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer body of commands than a typical key-value system - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ - - 'redis' => [ - - 'client' => env('REDIS_CLIENT', 'phpredis'), - - 'options' => [ - 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), - ], - - 'default' => [ - 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'username' => env('REDIS_USERNAME'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_DB', '0'), - ], - - 'cache' => [ - 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'username' => env('REDIS_USERNAME'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_CACHE_DB', '1'), - ], - - ], - -]; diff --git a/config/filesystems.php b/config/filesystems.php deleted file mode 100644 index 21ad5c8bdb4..00000000000 --- a/config/filesystems.php +++ /dev/null @@ -1,76 +0,0 @@ - env('FILESYSTEM_DISK', 'local'), - - /* - |-------------------------------------------------------------------------- - | Filesystem Disks - |-------------------------------------------------------------------------- - | - | Here you may configure as many filesystem "disks" as you wish, and you - | may even configure multiple disks of the same driver. Defaults have - | been set up for each driver as an example of the required values. - | - | Supported Drivers: "local", "ftp", "sftp", "s3" - | - */ - - 'disks' => [ - - 'local' => [ - 'driver' => 'local', - 'root' => storage_path('app'), - 'throw' => false, - ], - - 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', - 'visibility' => 'public', - 'throw' => false, - ], - - 's3' => [ - 'driver' => 's3', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION'), - 'bucket' => env('AWS_BUCKET'), - 'url' => env('AWS_URL'), - 'endpoint' => env('AWS_ENDPOINT'), - 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), - 'throw' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Symbolic Links - |-------------------------------------------------------------------------- - | - | Here you may configure the symbolic links that will be created when the - | `storage:link` Artisan command is executed. The array keys should be - | the locations of the links and the values should be their targets. - | - */ - - 'links' => [ - public_path('storage') => storage_path('app/public'), - ], - -]; diff --git a/config/hashing.php b/config/hashing.php deleted file mode 100644 index bcd3be4c28a..00000000000 --- a/config/hashing.php +++ /dev/null @@ -1,52 +0,0 @@ - 'bcrypt', - - /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'bcrypt' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), - ], - - /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'argon' => [ - 'memory' => 65536, - 'threads' => 1, - 'time' => 4, - ], - -]; diff --git a/config/logging.php b/config/logging.php deleted file mode 100644 index c44d27639aa..00000000000 --- a/config/logging.php +++ /dev/null @@ -1,131 +0,0 @@ - env('LOG_CHANNEL', 'stack'), - - /* - |-------------------------------------------------------------------------- - | Deprecations Log Channel - |-------------------------------------------------------------------------- - | - | This option controls the log channel that should be used to log warnings - | regarding deprecated PHP and library features. This allows you to get - | your application ready for upcoming major versions of dependencies. - | - */ - - 'deprecations' => [ - 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), - 'trace' => false, - ], - - /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | - */ - - 'channels' => [ - 'stack' => [ - 'driver' => 'stack', - 'channels' => ['single'], - 'ignore_exceptions' => false, - ], - - 'single' => [ - 'driver' => 'single', - 'path' => storage_path('logs/laravel.log'), - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - - 'daily' => [ - 'driver' => 'daily', - 'path' => storage_path('logs/laravel.log'), - 'level' => env('LOG_LEVEL', 'debug'), - 'days' => 14, - 'replace_placeholders' => true, - ], - - 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), - 'username' => 'Laravel Log', - 'emoji' => ':boom:', - 'level' => env('LOG_LEVEL', 'critical'), - 'replace_placeholders' => true, - ], - - 'papertrail' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), - 'handler_with' => [ - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'stderr' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => StreamHandler::class, - 'formatter' => env('LOG_STDERR_FORMATTER'), - 'with' => [ - 'stream' => 'php://stderr', - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'syslog' => [ - 'driver' => 'syslog', - 'level' => env('LOG_LEVEL', 'debug'), - 'facility' => LOG_USER, - 'replace_placeholders' => true, - ], - - 'errorlog' => [ - 'driver' => 'errorlog', - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - - 'null' => [ - 'driver' => 'monolog', - 'handler' => NullHandler::class, - ], - - 'emergency' => [ - 'path' => storage_path('logs/laravel.log'), - ], - ], - -]; diff --git a/config/mail.php b/config/mail.php deleted file mode 100644 index f21e8e70b4f..00000000000 --- a/config/mail.php +++ /dev/null @@ -1,126 +0,0 @@ - env('MAIL_MAILER', 'smtp'), - - /* - |-------------------------------------------------------------------------- - | Mailer Configurations - |-------------------------------------------------------------------------- - | - | Here you may configure all of the mailers used by your application plus - | their respective settings. Several examples have been configured for - | you and you are free to add your own as your application requires. - | - | Laravel supports a variety of mail "transport" drivers to be used while - | delivering an email. You may specify which one you're using for your - | mailers below. You are free to add additional mailers as required. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", - | "postmark", "log", "array", "failover" - | - */ - - 'mailers' => [ - 'smtp' => [ - 'transport' => 'smtp', - 'url' => env('MAIL_URL'), - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - 'port' => env('MAIL_PORT', 587), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'username' => env('MAIL_USERNAME'), - 'password' => env('MAIL_PASSWORD'), - 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN'), - ], - - 'ses' => [ - 'transport' => 'ses-v2', - ], - - 'mailgun' => [ - 'transport' => 'mailgun', - // 'client' => [ - // 'timeout' => 5, - // ], - ], - - 'postmark' => [ - 'transport' => 'postmark', - // 'message_stream_id' => null, - // 'client' => [ - // 'timeout' => 5, - // ], - ], - - 'sendmail' => [ - 'transport' => 'sendmail', - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), - ], - - 'log' => [ - 'transport' => 'log', - 'channel' => env('MAIL_LOG_CHANNEL'), - ], - - 'array' => [ - 'transport' => 'array', - ], - - 'failover' => [ - 'transport' => 'failover', - 'mailers' => [ - 'smtp', - 'log', - ], - ], - ], - - /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all emails sent by your application to be sent from - | the same address. Here you may specify a name and address that is - | used globally for all emails that are sent by your application. - | - */ - - 'from' => [ - 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), - 'name' => env('MAIL_FROM_NAME', 'Example'), - ], - - /* - |-------------------------------------------------------------------------- - | Markdown Mail Settings - |-------------------------------------------------------------------------- - | - | If you are using Markdown based email rendering, you may configure your - | theme and component paths here, allowing you to customize the design - | of the emails. Or, you may simply stick with the Laravel defaults! - | - */ - - 'markdown' => [ - 'theme' => 'default', - - 'paths' => [ - resource_path('views/vendor/mail'), - ], - ], - -]; diff --git a/config/queue.php b/config/queue.php deleted file mode 100644 index 638cd3393c8..00000000000 --- a/config/queue.php +++ /dev/null @@ -1,111 +0,0 @@ - env('QUEUE_CONNECTION', 'database'), - - /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" - | - */ - - 'connections' => [ - - 'sync' => [ - 'driver' => 'sync', - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'retry_after' => 90, - 'after_commit' => false, - ], - - 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 90, - 'block_for' => 0, - 'after_commit' => false, - ], - - 'sqs' => [ - 'driver' => 'sqs', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'default'), - 'suffix' => env('SQS_SUFFIX'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'after_commit' => false, - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => env('REDIS_QUEUE', 'default'), - 'retry_after' => 90, - 'block_for' => null, - 'after_commit' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Job Batching - |-------------------------------------------------------------------------- - | - | The following options configure the database and table that store job - | batching information. These options can be updated to any database - | connection and table which has been defined by your application. - | - */ - - 'batching' => [ - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'job_batches', - ], - - /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control how and where failed jobs are stored. Laravel ships with - | support for storing failed jobs in a simple file or in a database. - | - | Supported drivers: "database-uuids", "dynamodb", "file", "null" - | - */ - - 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', - ], - -]; diff --git a/config/services.php b/config/services.php deleted file mode 100644 index 0ace530e8d2..00000000000 --- a/config/services.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'domain' => env('MAILGUN_DOMAIN'), - 'secret' => env('MAILGUN_SECRET'), - 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), - 'scheme' => 'https', - ], - - 'postmark' => [ - 'token' => env('POSTMARK_TOKEN'), - ], - - 'ses' => [ - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - ], - -]; diff --git a/config/session.php b/config/session.php deleted file mode 100644 index 6593a7ec900..00000000000 --- a/config/session.php +++ /dev/null @@ -1,202 +0,0 @@ - env('SESSION_DRIVER', 'file'), - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to expire immediately when the browser is closed then you may - | indicate that via the expire_on_close configuration option. - | - */ - - 'lifetime' => env('SESSION_LIFETIME', 120), - - 'expire_on_close' => false, - - /* - |-------------------------------------------------------------------------- - | Session Encryption - |-------------------------------------------------------------------------- - | - | This option allows you to easily specify that all of your session data - | should be encrypted before it's stored. All encryption is performed - | automatically by Laravel and you may use the session like normal. - | - */ - - 'encrypt' => false, - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When utilizing the "file" session driver, we need a spot where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => storage_path('framework/sessions'), - - /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" or "redis" session drivers, you may specify a - | connection that should be used to manage these sessions. This should - | correspond to a connection in your database configuration options. - | - */ - - 'connection' => env('SESSION_CONNECTION'), - - /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | - */ - - 'table' => 'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Cache Store - |-------------------------------------------------------------------------- - | - | While using one of the framework's cache driven session backends you may - | list a cache store that should be used for these sessions. This value - | must match with one of the application's configured cache "stores". - | - | Affects: "apc", "dynamodb", "memcached", "redis" - | - */ - - 'store' => env('SESSION_STORE'), - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => [2, 100], - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - - 'cookie' => env( - 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_').'_session' - ), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => env('SESSION_DOMAIN'), - - /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you when it can't be done securely. - | - */ - - 'secure' => env('SESSION_SECURE_COOKIE'), - - /* - |-------------------------------------------------------------------------- - | HTTP Access Only - |-------------------------------------------------------------------------- - | - | Setting this value to true will prevent JavaScript from accessing the - | value of the cookie and the cookie will only be accessible through - | the HTTP protocol. You are free to modify this option if needed. - | - */ - - 'http_only' => true, - - /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | will set this value to "lax" since this is a secure default value. - | - | Supported: "lax", "strict", "none", null - | - */ - - 'same_site' => 'lax', - -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 22b8a18d325..00000000000 --- a/config/view.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - resource_path('views'), - ], - - /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | - */ - - 'compiled' => env( - 'VIEW_COMPILED_PATH', - realpath(storage_path('framework/views')) - ), - -]; From c4b31fce04ae7b7cd0032f8197915fab428385b3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 19:57:15 -0500 Subject: [PATCH 073/186] remove sanctum config --- config/sanctum.php | 69 ---------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 config/sanctum.php diff --git a/config/sanctum.php b/config/sanctum.php deleted file mode 100644 index 2b34787d792..00000000000 --- a/config/sanctum.php +++ /dev/null @@ -1,69 +0,0 @@ - explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( - '%s%s', - 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', - Sanctum::currentApplicationUrlWithPort() - ))), - - /* - |-------------------------------------------------------------------------- - | Sanctum Guards - |-------------------------------------------------------------------------- - | - | This array contains the authentication guards that will be checked when - | Sanctum is trying to authenticate a request. If none of these guards - | are able to authenticate the request, Sanctum will use the bearer - | token that's present on an incoming request for authentication. - | - */ - - 'guard' => ['web'], - - /* - |-------------------------------------------------------------------------- - | Expiration Minutes - |-------------------------------------------------------------------------- - | - | This value controls the number of minutes until an issued token will be - | considered expired. If this value is null, personal access tokens do - | not expire. This won't tweak the lifetime of first-party sessions. - | - */ - - 'expiration' => null, - - /* - |-------------------------------------------------------------------------- - | Sanctum Middleware - |-------------------------------------------------------------------------- - | - | When authenticating your first-party SPA with Sanctum you may need to - | customize some of the middleware Sanctum uses while processing the - | request. You may change the middleware listed below as required. - | - */ - - 'middleware' => [ - 'validate_csrf_token' => ValidateCsrfToken::class, - 'encrypt_cookies' => EncryptCookies::class, - ], - -]; From eb28c3521cf39f0a209bb16ca549db7bf7e8145f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 19:59:42 -0500 Subject: [PATCH 074/186] add redis client to env example --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index 535c2795eb5..eb6be03548c 100644 --- a/.env.example +++ b/.env.example @@ -33,6 +33,7 @@ SESSION_LIFETIME=120 MEMCACHED_HOST=127.0.0.1 +REDIS_CLIENT=phpredis REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 From fc584ea59240fcb0e2423c6fd47fa81d0244a377 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 20:38:13 -0500 Subject: [PATCH 075/186] update comments for provider changes --- routes/api.php | 4 ++-- routes/web.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/api.php b/routes/api.php index 889937e11a5..4c4e47f556c 100644 --- a/routes/api.php +++ b/routes/api.php @@ -9,8 +9,8 @@ |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These -| routes are loaded by the RouteServiceProvider and all of them will -| be assigned to the "api" middleware group. Make something great! +| routes are loaded within the "api" middleware group which includes +| the middleware most often needed by APIs. Build something great! | */ diff --git a/routes/web.php b/routes/web.php index d259f33ea86..c4181915201 100644 --- a/routes/web.php +++ b/routes/web.php @@ -8,8 +8,8 @@ |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These -| routes are loaded by the RouteServiceProvider and all of them will -| be assigned to the "web" middleware group. Make something great! +| routes are loaded within the "web" middleware group which includes +| sessions, cookie encryption, and more. Go build something great! | */ From a28b176809f2ce39bf7d474affc5e98aa1483a74 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Jun 2023 14:34:58 +0200 Subject: [PATCH 076/186] slim providers --- bootstrap/app.php | 4 ++++ bootstrap/cache/.gitignore | 1 + config/app.php | 24 +----------------------- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index d9b42863a4c..b70a111c804 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,5 +1,6 @@ withProviders([ + AppServiceProvider::class, + ]) ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore index d6b7ef32c84..70702d337dd 100644 --- a/bootstrap/cache/.gitignore +++ b/bootstrap/cache/.gitignore @@ -1,2 +1,3 @@ * !.gitignore +!package-providers.php diff --git a/config/app.php b/config/app.php index 7717c62dc19..3ac44ad1013 100644 --- a/config/app.php +++ b/config/app.php @@ -1,27 +1,5 @@ ServiceProvider::defaultProviders()->merge([ - // Package Service Providers... - ])->merge([ - // Application Service Providers... - App\Providers\AppServiceProvider::class, - ])->merge([ - // Added Service Providers (Do not remove this line)... - ])->toArray(), - + // ]; From a8ae3804244a0ba1893da7a1fc0a1284299ff981 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Jun 2023 14:37:37 +0200 Subject: [PATCH 077/186] slim providers work --- bootstrap/cache/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore index 70702d337dd..d6b7ef32c84 100644 --- a/bootstrap/cache/.gitignore +++ b/bootstrap/cache/.gitignore @@ -1,3 +1,2 @@ * !.gitignore -!package-providers.php From f35ef15072c381d5c2a97ae261fee26ab87bd656 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Jun 2023 14:55:21 +0200 Subject: [PATCH 078/186] work on slim providers --- bootstrap/providers.php | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 bootstrap/providers.php diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 00000000000..0b67a5fe474 --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,3 @@ + Date: Wed, 21 Jun 2023 14:56:30 +0200 Subject: [PATCH 079/186] work on slim providers --- bootstrap/app.php | 4 +--- bootstrap/providers.php | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b70a111c804..b52c4cfa60b 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -17,9 +17,7 @@ */ return Application::configure() - ->withProviders([ - AppServiceProvider::class, - ]) + ->withProviders() ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 0b67a5fe474..b8b01168a58 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -1,3 +1,5 @@ Date: Wed, 21 Jun 2023 15:04:11 +0200 Subject: [PATCH 080/186] slim provider work --- bootstrap/providers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/providers.php b/bootstrap/providers.php index b8b01168a58..38b258d1855 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -1,5 +1,5 @@ Date: Wed, 21 Jun 2023 15:08:02 +0200 Subject: [PATCH 081/186] remove import --- bootstrap/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b52c4cfa60b..db33fedaf57 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,6 +1,5 @@ Date: Wed, 21 Jun 2023 15:54:57 +0200 Subject: [PATCH 082/186] slim providers --- app/Providers/AppServiceProvider.php | 24 ------------------------ bootstrap/providers.php | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 app/Providers/AppServiceProvider.php diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php deleted file mode 100644 index 452e6b65b7a..00000000000 --- a/app/Providers/AppServiceProvider.php +++ /dev/null @@ -1,24 +0,0 @@ - Date: Tue, 27 Jun 2023 16:37:48 -0500 Subject: [PATCH 083/186] App Provider --- app/Providers/AppServiceProvider.php | 24 ++++++++++++++++++++++++ bootstrap/providers.php | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 app/Providers/AppServiceProvider.php diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php new file mode 100644 index 00000000000..452e6b65b7a --- /dev/null +++ b/app/Providers/AppServiceProvider.php @@ -0,0 +1,24 @@ + Date: Tue, 27 Jun 2023 21:38:18 +0000 Subject: [PATCH 084/186] Apply fixes from StyleCI --- bootstrap/providers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 793d3de2c46..38b258d1855 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -2,4 +2,4 @@ return [ App\Providers\AppServiceProvider::class, -]; \ No newline at end of file +]; From 4a5e4e6347f27475a4aeeb65aa08c04d86b2e433 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 17:27:59 -0500 Subject: [PATCH 085/186] use cast method --- app/Models/User.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 4d7f70f568f..ef70a00e6b0 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -34,12 +34,13 @@ class User extends Authenticatable ]; /** - * The attributes that should be cast. - * - * @var array + * Get the attributes that should be cast. */ - protected $casts = [ - 'email_verified_at' => 'datetime', - 'password' => 'hashed', - ]; + protected function casts(): array + { + return [ + 'email_verified_at' => 'datetime', + 'password' => 'hashed', + ]; + } } From 22e701e51c66639d53d1366cacb25a0e9631ac0b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 18:25:45 -0500 Subject: [PATCH 086/186] gitkeep in config --- config/.gitkeep | 0 config/app.php | 5 ----- 2 files changed, 5 deletions(-) create mode 100644 config/.gitkeep delete mode 100644 config/app.php diff --git a/config/.gitkeep b/config/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/config/app.php b/config/app.php deleted file mode 100644 index 3ac44ad1013..00000000000 --- a/config/app.php +++ /dev/null @@ -1,5 +0,0 @@ - Date: Fri, 30 Jun 2023 19:18:47 -0500 Subject: [PATCH 087/186] remove api routes file --- bootstrap/app.php | 2 +- composer.json | 1 - routes/api.php | 19 ------------------- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 routes/api.php diff --git a/bootstrap/app.php b/bootstrap/app.php index db33fedaf57..634a3ce7d2d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,7 +19,7 @@ ->withProviders() ->withRouting( web: __DIR__.'/../routes/web.php', - api: __DIR__.'/../routes/api.php', + // api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) diff --git a/composer.json b/composer.json index 4e32fd5407d..2d3a276338a 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,6 @@ "php": "^8.2", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^11.0", - "laravel/sanctum": "dev-develop", "laravel/tinker": "dev-develop" }, "require-dev": { diff --git a/routes/api.php b/routes/api.php deleted file mode 100644 index 4c4e47f556c..00000000000 --- a/routes/api.php +++ /dev/null @@ -1,19 +0,0 @@ -get('/user', function (Request $request) { - return $request->user(); -}); From 22e2b26359148de057411504b7e7548f5ab22e60 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 19:47:02 -0500 Subject: [PATCH 088/186] remove channels file --- bootstrap/app.php | 2 +- routes/channels.php | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 routes/channels.php diff --git a/bootstrap/app.php b/bootstrap/app.php index 634a3ce7d2d..6bec9a42b68 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -21,7 +21,7 @@ web: __DIR__.'/../routes/web.php', // api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', - channels: __DIR__.'/../routes/channels.php', + // channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // diff --git a/routes/channels.php b/routes/channels.php deleted file mode 100644 index 5d451e1fae8..00000000000 --- a/routes/channels.php +++ /dev/null @@ -1,18 +0,0 @@ -id === (int) $id; -}); From aad9201e236bfd4c440561c48921bd37ecd2a69c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 19:50:21 -0500 Subject: [PATCH 089/186] extract echo --- resources/js/bootstrap.js | 16 +--------------- resources/js/echo.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 resources/js/echo.js diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 846d3505856..d8e28e62b8a 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -15,18 +15,4 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; * allows your team to easily build robust real-time web applications. */ -// import Echo from 'laravel-echo'; - -// import Pusher from 'pusher-js'; -// window.Pusher = Pusher; - -// window.Echo = new Echo({ -// broadcaster: 'pusher', -// key: import.meta.env.VITE_PUSHER_APP_KEY, -// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', -// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, -// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, -// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, -// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', -// enabledTransports: ['ws', 'wss'], -// }); +// import './echo'; diff --git a/resources/js/echo.js b/resources/js/echo.js new file mode 100644 index 00000000000..520887d57d4 --- /dev/null +++ b/resources/js/echo.js @@ -0,0 +1,15 @@ +import Echo from 'laravel-echo'; + +import Pusher from 'pusher-js'; +window.Pusher = Pusher; + +window.Echo = new Echo({ + broadcaster: 'pusher', + key: import.meta.env.VITE_PUSHER_APP_KEY, + cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', + wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, + wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, + wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, + forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', + enabledTransports: ['ws', 'wss'], +}); From 591eb856396af44f824e92dcd3e64ee1caff0952 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 20:12:27 -0500 Subject: [PATCH 090/186] adjust comment --- resources/js/bootstrap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index d8e28e62b8a..af8d69b7015 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,6 +1,6 @@ /** * We'll load the axios HTTP library which allows us to easily issue requests - * to our Laravel back-end. This library automatically handles sending the + * to our Laravel back end. This library automatically handles sending the * CSRF token as a header based on the value of the "XSRF" token cookie. */ @@ -12,7 +12,7 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; /** * Echo exposes an expressive API for subscribing to channels and listening * for events that are broadcast by Laravel. Echo and event broadcasting - * allows your team to easily build robust real-time web applications. + * allow your team to quickly build robust real-time web applications. */ // import './echo'; From daeb358ffd504ea1a5caf5c44a92bd3628896b95 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 20:38:33 -0500 Subject: [PATCH 091/186] update comment --- tests/CreatesApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index cc68301129c..0cd56d07985 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -8,7 +8,7 @@ trait CreatesApplication { /** - * Creates the application. + * Create a new application instance. */ public function createApplication(): Application { From 8e5a2eeaf92d63d9dec6d4f0185826950a0322dd Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 22:02:02 -0500 Subject: [PATCH 092/186] remove has api tokens trait --- app/Models/User.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index ef70a00e6b0..04ed4706403 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -6,11 +6,10 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Laravel\Sanctum\HasApiTokens; class User extends Authenticatable { - use HasApiTokens, HasFactory, Notifiable; + use HasFactory, Notifiable; /** * The attributes that are mass assignable. From 208ebf76d7ffc5317f2a8e533112d23e205a933a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 7 Jul 2023 17:12:30 +0200 Subject: [PATCH 093/186] echo file is not needed --- resources/js/bootstrap.js | 8 -------- resources/js/echo.js | 15 --------------- 2 files changed, 23 deletions(-) delete mode 100644 resources/js/echo.js diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index af8d69b7015..27add9e00ba 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -8,11 +8,3 @@ import axios from 'axios'; window.axios = axios; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; - -/** - * Echo exposes an expressive API for subscribing to channels and listening - * for events that are broadcast by Laravel. Echo and event broadcasting - * allow your team to quickly build robust real-time web applications. - */ - -// import './echo'; diff --git a/resources/js/echo.js b/resources/js/echo.js deleted file mode 100644 index 520887d57d4..00000000000 --- a/resources/js/echo.js +++ /dev/null @@ -1,15 +0,0 @@ -import Echo from 'laravel-echo'; - -import Pusher from 'pusher-js'; -window.Pusher = Pusher; - -window.Echo = new Echo({ - broadcaster: 'pusher', - key: import.meta.env.VITE_PUSHER_APP_KEY, - cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', - wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, - wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, - wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, - forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', - enabledTransports: ['ws', 'wss'], -}); From 58077d049a86bbe1de4218b720474f726363ea59 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 15 Aug 2023 13:48:07 -0500 Subject: [PATCH 094/186] update comment --- resources/js/bootstrap.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 27add9e00ba..677d70b2b8b 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,7 +1,8 @@ /** - * We'll load the axios HTTP library which allows us to easily issue requests - * to our Laravel back end. This library automatically handles sending the - * CSRF token as a header based on the value of the "XSRF" token cookie. + * The axios HTTP library is used by a variety of first-party Laravel packages + * like Inertia in order to make requests to the Laravel backend. This will + * automatically handle sending the CSRF token via a header based on the + * value of the "XSRF" token cookie sent with previous HTTP responses. */ import axios from 'axios'; From 05984cfd4346e33cedfa715c085f02b3653a0b58 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 15:56:39 -0500 Subject: [PATCH 095/186] policies property is not needed with auto discovery --- app/Providers/AuthServiceProvider.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 54756cd1cbd..ddf609011fa 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -7,15 +7,6 @@ class AuthServiceProvider extends ServiceProvider { - /** - * The model to policy mappings for the application. - * - * @var array - */ - protected $policies = [ - // - ]; - /** * Register any authentication / authorization services. */ From 7abb5df4cc47f94506d11706035467a8be873649 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 17:07:55 -0500 Subject: [PATCH 096/186] auto register email verification listener --- app/Providers/EventServiceProvider.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 2d65aac0ef0..65eabb68f4a 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,24 +2,10 @@ namespace App\Providers; -use Illuminate\Auth\Events\Registered; -use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Event; class EventServiceProvider extends ServiceProvider { - /** - * The event to listener mappings for the application. - * - * @var array> - */ - protected $listen = [ - Registered::class => [ - SendEmailVerificationNotification::class, - ], - ]; - /** * Register any events for your application. */ From c6b91aa4db19c7027c45ad3d6e301ede370059c8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 17:29:34 -0500 Subject: [PATCH 097/186] enable event discovery by default --- app/Providers/EventServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 65eabb68f4a..79f49b8337b 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -19,6 +19,6 @@ public function boot(): void */ public function shouldDiscoverEvents(): bool { - return false; + return true; } } From 3d7684066c586c7da55328ac106026146028f864 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 18 Apr 2023 17:31:41 -0500 Subject: [PATCH 098/186] move broadcast routes into provider - delete routes file --- app/Providers/BroadcastServiceProvider.php | 4 +++- routes/channels.php | 18 ------------------ 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 routes/channels.php diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 2be04f5d9da..092c8bdeea4 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -14,6 +14,8 @@ public function boot(): void { Broadcast::routes(); - require base_path('routes/channels.php'); + Broadcast::channel('App.Models.User.{id}', function ($user, $id) { + return (int) $user->id === (int) $id; + }); } } diff --git a/routes/channels.php b/routes/channels.php deleted file mode 100644 index 5d451e1fae8..00000000000 --- a/routes/channels.php +++ /dev/null @@ -1,18 +0,0 @@ -id === (int) $id; -}); From 6288bbfb902989c789ead61f949c839b06d3b29b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 13:39:18 -0500 Subject: [PATCH 099/186] add base middleware for guest, dont use redirect to on json requests by default --- app/Http/Middleware/Authenticate.php | 2 +- .../Middleware/RedirectIfAuthenticated.php | 22 +++++-------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index d4ef6447a9c..63a433e524f 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -12,6 +12,6 @@ class Authenticate extends Middleware */ protected function redirectTo(Request $request): ?string { - return $request->expectsJson() ? null : route('login'); + return route('login'); } } diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index afc78c4e539..e67219c833c 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -3,28 +3,16 @@ namespace App\Http\Middleware; use App\Providers\RouteServiceProvider; -use Closure; +use Illuminate\Auth\Middleware\RedirectIfAuthenticated as Middleware; use Illuminate\Http\Request; -use Illuminate\Support\Facades\Auth; -use Symfony\Component\HttpFoundation\Response; -class RedirectIfAuthenticated +class RedirectIfAuthenticated extends Middleware { /** - * Handle an incoming request. - * - * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next + * Get the path the user should be redirected to when they are authenticated. */ - public function handle(Request $request, Closure $next, string ...$guards): Response + protected function redirectTo(Request $request): ?string { - $guards = empty($guards) ? [null] : $guards; - - foreach ($guards as $guard) { - if (Auth::guard($guard)->check()) { - return redirect(RouteServiceProvider::HOME); - } - } - - return $next($request); + return RouteServiceProvider::HOME; } } From 45a634144b2311d0ca5f4d15bb732ab5ce0be885 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 14:02:00 -0500 Subject: [PATCH 100/186] remove trust proxies from skeleton --- app/Http/Kernel.php | 2 +- app/Http/Middleware/TrustProxies.php | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 app/Http/Middleware/TrustProxies.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 494c0501b13..9b1a6b7233a 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -15,7 +15,7 @@ class Kernel extends HttpKernel */ protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, - \App\Http\Middleware\TrustProxies::class, + \Illuminate\Http\Middleware\TrustProxies::class, \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php deleted file mode 100644 index 3391630ecc9..00000000000 --- a/app/Http/Middleware/TrustProxies.php +++ /dev/null @@ -1,28 +0,0 @@ -|string|null - */ - protected $proxies; - - /** - * The headers that should be used to detect proxies. - * - * @var int - */ - protected $headers = - Request::HEADER_X_FORWARDED_FOR | - Request::HEADER_X_FORWARDED_HOST | - Request::HEADER_X_FORWARDED_PORT | - Request::HEADER_X_FORWARDED_PROTO | - Request::HEADER_X_FORWARDED_AWS_ELB; -} From 581d591fb2c509a09e49a1fbcdf3a626dd762a1c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 14:05:49 -0500 Subject: [PATCH 101/186] remove trust hosts from skeleton --- app/Http/Kernel.php | 2 +- app/Http/Middleware/TrustHosts.php | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 app/Http/Middleware/TrustHosts.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 9b1a6b7233a..c9c39e9d7f9 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -14,7 +14,7 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ - // \App\Http\Middleware\TrustHosts::class, + // \Illuminate\Http\Middleware\TrustHosts::class, \Illuminate\Http\Middleware\TrustProxies::class, \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php deleted file mode 100644 index c9c58bddcea..00000000000 --- a/app/Http/Middleware/TrustHosts.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - public function hosts(): array - { - return [ - $this->allSubdomainsOfApplicationUrl(), - ]; - } -} From c512fa62ffcea4aebcafefb1d93c7cd082ce17d9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 20 Apr 2023 16:29:16 -0500 Subject: [PATCH 102/186] use base validate signature middleware --- app/Http/Kernel.php | 68 ----------------------- app/Http/Middleware/ValidateSignature.php | 22 -------- 2 files changed, 90 deletions(-) delete mode 100644 app/Http/Kernel.php delete mode 100644 app/Http/Middleware/ValidateSignature.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index c9c39e9d7f9..00000000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ - protected $middleware = [ - // \Illuminate\Http\Middleware\TrustHosts::class, - \Illuminate\Http\Middleware\TrustProxies::class, - \Illuminate\Http\Middleware\HandleCors::class, - \App\Http\Middleware\PreventRequestsDuringMaintenance::class, - \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, - \App\Http\Middleware\TrimStrings::class, - \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - ]; - - /** - * The application's route middleware groups. - * - * @var array> - */ - protected $middlewareGroups = [ - 'web' => [ - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, - \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - - 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - ]; - - /** - * The application's middleware aliases. - * - * Aliases may be used instead of class names to conveniently assign middleware to routes and groups. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => \App\Http\Middleware\Authenticate::class, - 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, - 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, - 'can' => \Illuminate\Auth\Middleware\Authorize::class, - 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, - 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, - 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class, - 'signed' => \App\Http\Middleware\ValidateSignature::class, - 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, - 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, - ]; -} diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php deleted file mode 100644 index 093bf64af81..00000000000 --- a/app/Http/Middleware/ValidateSignature.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - protected $except = [ - // 'fbclid', - // 'utm_campaign', - // 'utm_content', - // 'utm_medium', - // 'utm_source', - // 'utm_term', - ]; -} From 8f6df616391b45946f237eceb0da2765175b5936 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 14:25:59 -0500 Subject: [PATCH 103/186] rename csrf middleware for consistency --- app/Http/Middleware/ValidateCsrfToken.php | 17 +++++++++++++++++ app/Http/Middleware/VerifyCsrfToken.php | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 app/Http/Middleware/ValidateCsrfToken.php delete mode 100644 app/Http/Middleware/VerifyCsrfToken.php diff --git a/app/Http/Middleware/ValidateCsrfToken.php b/app/Http/Middleware/ValidateCsrfToken.php new file mode 100644 index 00000000000..e87f7208880 --- /dev/null +++ b/app/Http/Middleware/ValidateCsrfToken.php @@ -0,0 +1,17 @@ + + */ + protected $except = [ + // + ]; +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php deleted file mode 100644 index 9e86521722b..00000000000 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} From 6038deecdb2bdbc15b0eab762d343460f4e11751 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 14:28:11 -0500 Subject: [PATCH 104/186] update sanctums use of csrf middleware --- config/sanctum.php | 83 ---------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 config/sanctum.php diff --git a/config/sanctum.php b/config/sanctum.php deleted file mode 100644 index e739e96e9cf..00000000000 --- a/config/sanctum.php +++ /dev/null @@ -1,83 +0,0 @@ - explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( - '%s%s', - 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', - Sanctum::currentApplicationUrlWithPort() - ))), - - /* - |-------------------------------------------------------------------------- - | Sanctum Guards - |-------------------------------------------------------------------------- - | - | This array contains the authentication guards that will be checked when - | Sanctum is trying to authenticate a request. If none of these guards - | are able to authenticate the request, Sanctum will use the bearer - | token that's present on an incoming request for authentication. - | - */ - - 'guard' => ['web'], - - /* - |-------------------------------------------------------------------------- - | Expiration Minutes - |-------------------------------------------------------------------------- - | - | This value controls the number of minutes until an issued token will be - | considered expired. This will override any values set in the token's - | "expires_at" attribute, but first-party sessions are not affected. - | - */ - - 'expiration' => null, - - /* - |-------------------------------------------------------------------------- - | Token Prefix - |-------------------------------------------------------------------------- - | - | Sanctum can prefix new tokens in order to take advantage of various - | security scanning initiaives maintained by open source platforms - | that alert developers if they commit tokens into repositories. - | - | See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning - | - */ - - 'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''), - - /* - |-------------------------------------------------------------------------- - | Sanctum Middleware - |-------------------------------------------------------------------------- - | - | When authenticating your first-party SPA with Sanctum you may need to - | customize some of the middleware Sanctum uses while processing the - | request. You may change the middleware listed below as required. - | - */ - - 'middleware' => [ - 'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class, - 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, - 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, - ], - -]; From 4b9eb7cf97551a1c1f5c728ec61eac7e4b2613fc Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 14:34:27 -0500 Subject: [PATCH 105/186] use base encrypt cookies and trim strings middleware --- app/Http/Middleware/EncryptCookies.php | 17 ----------------- app/Http/Middleware/TrimStrings.php | 19 ------------------- 2 files changed, 36 deletions(-) delete mode 100644 app/Http/Middleware/EncryptCookies.php delete mode 100644 app/Http/Middleware/TrimStrings.php diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php deleted file mode 100644 index 867695bdcff..00000000000 --- a/app/Http/Middleware/EncryptCookies.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 88cadcaaf28..00000000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ - protected $except = [ - 'current_password', - 'password', - 'password_confirmation', - ]; -} From 9010aeb6e0a86358536b38bdd24467a447d6a4a1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 15:09:18 -0500 Subject: [PATCH 106/186] no longer necessary to load commands manually --- app/Console/Kernel.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index e6b9960ec1b..f88ec24bd70 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -20,8 +20,6 @@ protected function schedule(Schedule $schedule): void */ protected function commands(): void { - $this->load(__DIR__.'/Commands'); - require base_path('routes/console.php'); } } From 1e69c4e8b5ff257c3fc87bb04f1e1ceccefdb214 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 21 Apr 2023 15:19:13 -0500 Subject: [PATCH 107/186] move commands in console kernel - remove console routes file --- app/Console/Kernel.php | 6 +++++- routes/console.php | 19 ------------------- 2 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 routes/console.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index f88ec24bd70..5566268dd89 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -4,6 +4,8 @@ use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use Illuminate\Foundation\Inspiring; +use Illuminate\Support\Facades\Artisan; class Kernel extends ConsoleKernel { @@ -20,6 +22,8 @@ protected function schedule(Schedule $schedule): void */ protected function commands(): void { - require base_path('routes/console.php'); + Artisan::command('inspire', function () { + $this->comment(Inspiring::quote()); + })->purpose('Display an inspiring quote'); } } diff --git a/routes/console.php b/routes/console.php deleted file mode 100644 index e05f4c9a1b2..00000000000 --- a/routes/console.php +++ /dev/null @@ -1,19 +0,0 @@ -comment(Inspiring::quote()); -})->purpose('Display an inspiring quote'); From 94a124bdae1e4dbd2a04bae2db24780a916d2ba0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 15:14:54 -0500 Subject: [PATCH 108/186] use base maintenance middleware --- .../PreventRequestsDuringMaintenance.php | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 app/Http/Middleware/PreventRequestsDuringMaintenance.php diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php deleted file mode 100644 index 74cbd9a9eaa..00000000000 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} From 560d7ea7332cff6a09563636e3103e35bc2930c7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 15:53:25 -0500 Subject: [PATCH 109/186] clean up bootstrap - remove exception handler --- app/Exceptions/Handler.php | 30 ------------------------- bootstrap/app.php | 45 +++----------------------------------- 2 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 app/Exceptions/Handler.php diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php deleted file mode 100644 index 56af26405d4..00000000000 --- a/app/Exceptions/Handler.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ - protected $dontFlash = [ - 'current_password', - 'password', - 'password_confirmation', - ]; - - /** - * Register the exception handling callbacks for the application. - */ - public function register(): void - { - $this->reportable(function (Throwable $e) { - // - }); - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17df03b..0d438d29c33 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,5 +1,7 @@ singleton( - Illuminate\Contracts\Http\Kernel::class, - App\Http\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Console\Kernel::class, - App\Console\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class -); - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; +return Application::create()->withExceptionHandling(); From 04fb0190928b04d99d42a2b3580375881312592d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 16:06:39 -0500 Subject: [PATCH 110/186] fix comment --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 0d438d29c33..88e197e64be 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -9,7 +9,7 @@ | | The first thing we will do is create a new Laravel application instance | which serves as the "glue" for all the components of Laravel, and is -| the IoC container for the system binding all of the various parts. +| the service container that can resolve all classes and components. | */ From 244219351f1b175d9bdcbcc888c57bf8d5482f28 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 16:20:41 -0500 Subject: [PATCH 111/186] pass an exception handler callbacklara --- bootstrap/app.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 88e197e64be..897fa4c3651 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -13,4 +13,7 @@ | */ -return Application::create()->withExceptionHandling(); +return Application::create() + ->withExceptionHandling(function ($handler) { + // + }); From 6ab63b8242f36e238caddfcc8acf095c79ff08d4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 5 May 2023 16:24:17 -0500 Subject: [PATCH 112/186] import class in database seeder --- database/seeders/DatabaseSeeder.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a9f4519fce3..3aa30cf6fa0 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,6 +2,7 @@ namespace Database\Seeders; +use App\Models\User; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; @@ -12,9 +13,9 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - // \App\Models\User::factory(10)->create(); + // User::factory(10)->create(); - // \App\Models\User::factory()->create([ + // User::factory()->create([ // 'name' => 'Test User', // 'email' => 'test@example.com', // ]); From 336ad619ede2c7a8a44670f99d1b60d336e54996 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 May 2023 14:27:01 -0500 Subject: [PATCH 113/186] rename migrations --- ... 0001_01_01_000000_create_users_table.php} | 7 ++++ ...000_create_password_reset_tokens_table.php | 28 ---------------- ..._08_19_000000_create_failed_jobs_table.php | 32 ------------------ ...01_create_personal_access_tokens_table.php | 33 ------------------- 4 files changed, 7 insertions(+), 93 deletions(-) rename database/migrations/{2014_10_12_000000_create_users_table.php => 0001_01_01_000000_create_users_table.php} (72%) delete mode 100644 database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php delete mode 100644 database/migrations/2019_08_19_000000_create_failed_jobs_table.php delete mode 100644 database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php similarity index 72% rename from database/migrations/2014_10_12_000000_create_users_table.php rename to database/migrations/0001_01_01_000000_create_users_table.php index 444fafb7f53..9e22f06d70e 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -20,6 +20,12 @@ public function up(): void $table->rememberToken(); $table->timestamps(); }); + + Schema::create('password_reset_tokens', function (Blueprint $table) { + $table->string('email')->primary(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); } /** @@ -28,5 +34,6 @@ public function up(): void public function down(): void { Schema::dropIfExists('users'); + Schema::dropIfExists('password_reset_tokens'); } }; diff --git a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php deleted file mode 100644 index 81a7229b085..00000000000 --- a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php +++ /dev/null @@ -1,28 +0,0 @@ -string('email')->primary(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('password_reset_tokens'); - } -}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php deleted file mode 100644 index 249da8171ac..00000000000 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->string('uuid')->unique(); - $table->text('connection'); - $table->text('queue'); - $table->longText('payload'); - $table->longText('exception'); - $table->timestamp('failed_at')->useCurrent(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('failed_jobs'); - } -}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index e828ad8189e..00000000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('personal_access_tokens'); - } -}; From 2dd70d6f0ce92a1bad94f8192716e1a6961659e5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 14:44:25 -0500 Subject: [PATCH 114/186] update comment regarding failed job drivers --- config/queue.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/queue.php b/config/queue.php index 01c6b054d48..55288fc9396 100644 --- a/config/queue.php +++ b/config/queue.php @@ -95,8 +95,10 @@ |-------------------------------------------------------------------------- | | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. + | can control how and where failed jobs are stored. Laravel ships with + | support for storing failed jobs in a simple file or in a database. + | + | Supported drivers: "database-uuids", "dynamodb", "file", "null" | */ From 615535c6b3758aa79333af4214fa4852a488b378 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 16:08:23 -0500 Subject: [PATCH 115/186] use file driver for failed jobs in new applications --- config/queue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/queue.php b/config/queue.php index 55288fc9396..e71cec2bd90 100644 --- a/config/queue.php +++ b/config/queue.php @@ -103,7 +103,7 @@ */ 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'driver' => env('QUEUE_FAILED_DRIVER', 'file'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], From 03efddb98c29c5b26bad4982b9f458c3ff4e11a6 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 16:39:56 -0500 Subject: [PATCH 116/186] remove csrf middleware from skeleton --- app/Http/Middleware/ValidateCsrfToken.php | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 app/Http/Middleware/ValidateCsrfToken.php diff --git a/app/Http/Middleware/ValidateCsrfToken.php b/app/Http/Middleware/ValidateCsrfToken.php deleted file mode 100644 index e87f7208880..00000000000 --- a/app/Http/Middleware/ValidateCsrfToken.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} From e0eeda3364501b179741b460b9c9305dda50f523 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 10 May 2023 16:50:07 -0500 Subject: [PATCH 117/186] remove two traits from base controller --- app/Http/Controllers/Controller.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 77ec359ab4d..3584dcdb8bf 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,11 +2,9 @@ namespace App\Http\Controllers; -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; -use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { - use AuthorizesRequests, ValidatesRequests; + // } From 47750327a2b544e270972f2123d5bd9c0e0cb3dd Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 15:00:39 -0500 Subject: [PATCH 118/186] use database by default for failed jobs - ship combined job migration --- config/queue.php | 2 +- .../0001_01_01_000001_create_jobs_table.php | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 database/migrations/0001_01_01_000001_create_jobs_table.php diff --git a/config/queue.php b/config/queue.php index e71cec2bd90..55288fc9396 100644 --- a/config/queue.php +++ b/config/queue.php @@ -103,7 +103,7 @@ */ 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'file'), + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], diff --git a/database/migrations/0001_01_01_000001_create_jobs_table.php b/database/migrations/0001_01_01_000001_create_jobs_table.php new file mode 100644 index 00000000000..cd80d421380 --- /dev/null +++ b/database/migrations/0001_01_01_000001_create_jobs_table.php @@ -0,0 +1,43 @@ +id(); + $table->string('queue')->index(); + $table->longText('payload'); + $table->unsignedTinyInteger('attempts'); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + }); + + Schema::create('failed_jobs', function (Blueprint $table) { + $table->id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('jobs'); + Schema::dropIfExists('failed_jobs'); + } +}; From 735b375f97669977c84886c5d282685b383e66fe Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 15:40:40 -0500 Subject: [PATCH 119/186] uncomment test user --- database/seeders/DatabaseSeeder.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 3aa30cf6fa0..d01a0ef2f7f 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,9 +15,9 @@ public function run(): void { // User::factory(10)->create(); - // User::factory()->create([ - // 'name' => 'Test User', - // 'email' => 'test@example.com', - // ]); + User::factory()->create([ + 'name' => 'Test User', + 'email' => 'test@example.com', + ]); } } From 7d39ac28207c2c71cbd46be0a7129f1dfbec3970 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 11 May 2023 21:28:12 +0100 Subject: [PATCH 120/186] Update DatabaseSeeder.php --- database/seeders/DatabaseSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index d01a0ef2f7f..0f4dd8fee66 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,7 +2,7 @@ namespace Database\Seeders; -use App\Models\User; +// use App\Models\User; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; From a8241721a307ac44071b36e4802f004218743c9c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 15:41:08 -0500 Subject: [PATCH 121/186] uncomment import --- database/seeders/DatabaseSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 0f4dd8fee66..d01a0ef2f7f 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -2,7 +2,7 @@ namespace Database\Seeders; -// use App\Models\User; +use App\Models\User; // use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; From 6be77e25a0c4c127dff1e9464655f633f8b5fd61 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 15:53:21 -0500 Subject: [PATCH 122/186] update doc block for broadcast service provider --- app/Providers/BroadcastServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 092c8bdeea4..b4ec755177e 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -8,7 +8,7 @@ class BroadcastServiceProvider extends ServiceProvider { /** - * Bootstrap any application services. + * Bootstrap event broadcasting services. */ public function boot(): void { From 008633bcb48417fe9c2cf6fa4d7da3ba13ad2bf0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 11 May 2023 22:35:40 -0500 Subject: [PATCH 123/186] use channel file... remove provider --- app/Providers/BroadcastServiceProvider.php | 21 --------------------- bootstrap/app.php | 1 + config/app.php | 1 - routes/channels.php | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+), 22 deletions(-) delete mode 100644 app/Providers/BroadcastServiceProvider.php create mode 100644 routes/channels.php diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index b4ec755177e..00000000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,21 +0,0 @@ -id === (int) $id; - }); - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index 897fa4c3651..b49a7c6236f 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -14,6 +14,7 @@ */ return Application::create() + ->withBroadcasting() ->withExceptionHandling(function ($handler) { // }); diff --git a/config/app.php b/config/app.php index 4c231b47d32..53b8e570ca8 100644 --- a/config/app.php +++ b/config/app.php @@ -165,7 +165,6 @@ */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, - // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, ])->toArray(), diff --git a/routes/channels.php b/routes/channels.php new file mode 100644 index 00000000000..5d451e1fae8 --- /dev/null +++ b/routes/channels.php @@ -0,0 +1,18 @@ +id === (int) $id; +}); From c90127da1d214ba015ea8759d23f0c5eae8298c9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 13 May 2023 15:16:48 -0500 Subject: [PATCH 124/186] remove event and auth service providers --- app/Providers/AuthServiceProvider.php | 17 ----------------- app/Providers/EventServiceProvider.php | 24 ------------------------ config/app.php | 3 +-- 3 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 app/Providers/AuthServiceProvider.php delete mode 100644 app/Providers/EventServiceProvider.php diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php deleted file mode 100644 index ddf609011fa..00000000000 --- a/app/Providers/AuthServiceProvider.php +++ /dev/null @@ -1,17 +0,0 @@ -toArray(), From f04d1d47ddbbc9728665a29ef75119b0049636eb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 12:11:09 -0500 Subject: [PATCH 125/186] remove event service provider from config - auto registered now --- config/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/config/app.php b/config/app.php index 9a9092d8e28..52c4741a15d 100644 --- a/config/app.php +++ b/config/app.php @@ -164,7 +164,6 @@ * Application Service Providers... */ App\Providers\AppServiceProvider::class, - Illuminate\Foundation\Support\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, ])->toArray(), From 0388f36aafac67c79b58ad470ee0c21191a3e180 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 16:17:18 -0500 Subject: [PATCH 126/186] update providers config to be more robust for replacements --- config/app.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/config/app.php b/config/app.php index 52c4741a15d..978a022198e 100644 --- a/config/app.php +++ b/config/app.php @@ -149,22 +149,20 @@ | Autoloaded Service Providers |-------------------------------------------------------------------------- | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. + | The service providers listed here will be automatically loaded on any + | requests to your application. You may add your own services to the + | arrays below to provide additional features to this application. | */ 'providers' => ServiceProvider::defaultProviders()->merge([ - /* - * Package Service Providers... - */ - - /* - * Application Service Providers... - */ + // Package Service Providers... + ])->merge([ + // Application Service Providers... App\Providers\AppServiceProvider::class, App\Providers\RouteServiceProvider::class, + ])->merge([ + // Added Service Providers (Do not remove this line)... ])->toArray(), /* From d1993cd32eb0286e6af1d3cee4fd0b0eea7a6826 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 16:44:28 -0500 Subject: [PATCH 127/186] route service provider no longer necessary. bootstrap --- app/Providers/RouteServiceProvider.php | 40 -------------------------- bootstrap/app.php | 5 ++++ config/app.php | 2 +- 3 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 app/Providers/RouteServiceProvider.php diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php deleted file mode 100644 index 1cf5f15c226..00000000000 --- a/app/Providers/RouteServiceProvider.php +++ /dev/null @@ -1,40 +0,0 @@ -by($request->user()?->id ?: $request->ip()); - }); - - $this->routes(function () { - Route::middleware('api') - ->prefix('api') - ->group(base_path('routes/api.php')); - - Route::middleware('web') - ->group(base_path('routes/web.php')); - }); - } -} diff --git a/bootstrap/app.php b/bootstrap/app.php index b49a7c6236f..b47fc8a31bd 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,6 +1,7 @@ withBroadcasting() + ->withRouting( + web: __DIR__.'/../routes/web.php', + api: __DIR__.'/../routes/api.php', + ) ->withExceptionHandling(function ($handler) { // }); diff --git a/config/app.php b/config/app.php index 978a022198e..11f69c1ef14 100644 --- a/config/app.php +++ b/config/app.php @@ -160,7 +160,7 @@ ])->merge([ // Application Service Providers... App\Providers\AppServiceProvider::class, - App\Providers\RouteServiceProvider::class, + // App\Providers\RouteServiceProvider::class, ])->merge([ // Added Service Providers (Do not remove this line)... ])->toArray(), From 87d2f54198bb43443d06779d6ab9ea5e29e4eaf8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 17 May 2023 16:48:04 -0500 Subject: [PATCH 128/186] remove commented service provider --- config/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/config/app.php b/config/app.php index 11f69c1ef14..786b5db4e8c 100644 --- a/config/app.php +++ b/config/app.php @@ -160,7 +160,6 @@ ])->merge([ // Application Service Providers... App\Providers\AppServiceProvider::class, - // App\Providers\RouteServiceProvider::class, ])->merge([ // Added Service Providers (Do not remove this line)... ])->toArray(), From 5a4fd61d2a7eba6c40323e7a41ed0652d6a1dc46 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 19 May 2023 16:09:18 -0500 Subject: [PATCH 129/186] console kernel not needed... console routes file can define schedule --- app/Console/Kernel.php | 29 ----------------------------- routes/console.php | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 29 deletions(-) delete mode 100644 app/Console/Kernel.php create mode 100644 routes/console.php diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index 5566268dd89..00000000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,29 +0,0 @@ -command('inspire')->hourly(); - } - - /** - * Register the commands for the application. - */ - protected function commands(): void - { - Artisan::command('inspire', function () { - $this->comment(Inspiring::quote()); - })->purpose('Display an inspiring quote'); - } -} diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 00000000000..6805475edfb --- /dev/null +++ b/routes/console.php @@ -0,0 +1,33 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote'); + +/* +|-------------------------------------------------------------------------- +| Console Schedule +|-------------------------------------------------------------------------- +| +| Below you may define your scheduled tasks, including console commands +| or system commands. These tasks will be run automatically when due +| using Laravel's built-in "schedule:run" Artisan console command. +| +*/ + +Schedule::command('inspire')->hourly(); From 5ff795db08ac41c3714fa9a3f0eac96126bd9ec1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 21 May 2023 12:27:03 -0500 Subject: [PATCH 130/186] update to use app builder --- bootstrap/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b47fc8a31bd..30c8c7fe165 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -14,7 +14,7 @@ | */ -return Application::create() +return Application::configure() ->withBroadcasting() ->withRouting( web: __DIR__.'/../routes/web.php', @@ -22,4 +22,4 @@ ) ->withExceptionHandling(function ($handler) { // - }); + })->create(); From 60050bbafafafaf454f7f6b18b0c25f694f8a1f0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 21 May 2023 12:27:41 -0500 Subject: [PATCH 131/186] remove unnecessary import --- bootstrap/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 30c8c7fe165..a8c11dd19b6 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,7 +1,6 @@ Date: Sun, 21 May 2023 15:32:26 -0500 Subject: [PATCH 132/186] http kernel is no longer necessary --- bootstrap/app.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index a8c11dd19b6..5bc7833ce84 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,6 +1,8 @@ withExceptionHandling(function ($handler) { + ->withMiddleware(function (Middleware $middleware) { + // + }) + ->withExceptionHandling(function (ExceptionHandler $handler) { // })->create(); From 2443600f8572c427c4e9634f7a415572b28b6e1c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 14:57:42 -0500 Subject: [PATCH 133/186] update comment --- bootstrap/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 5bc7833ce84..2a5f46c8779 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -10,8 +10,8 @@ |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance -| which serves as the "glue" for all the components of Laravel, and is -| the service container that can resolve all classes and components. +| which serves as the "glue" for all the components of Laravel. We can +| also use the application to configure core, foundational behavior. | */ From 19647af1aac216b735a04bb4cce7a22b6e49bf0e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:09:39 -0500 Subject: [PATCH 134/186] streamline incoming request / cli files --- artisan | 31 +++++++------------------------ bootstrap/app.php | 2 +- public/index.php | 8 +------- 3 files changed, 9 insertions(+), 32 deletions(-) diff --git a/artisan b/artisan index 67a3329b183..be54681972c 100755 --- a/artisan +++ b/artisan @@ -1,6 +1,8 @@ #!/usr/bin/env php make(Illuminate\Contracts\Console\Kernel::class); - -$status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\ConsoleOutput -); - -/* -|-------------------------------------------------------------------------- -| Shutdown The Application -|-------------------------------------------------------------------------- -| -| Once Artisan has finished running, we will fire off the shutdown events -| so that any final work may be done by the application before we shut -| down the process. This is the last thing to happen to the request. -| -*/ +$app = require_once __DIR__.'/bootstrap/app.php'; -$kernel->terminate($input, $status); +$status = $app->handleCommand(new ArgvInput); exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php index 2a5f46c8779..c67001b837e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,8 +1,8 @@ make(Kernel::class); - -$response = $kernel->handle( - $request = Request::capture() -)->send(); - -$kernel->terminate($request, $response); +$app->handleRequest(Request::capture()); From a8484850570e990cf203fd8bb2096e82e3ed57e4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:13:13 -0500 Subject: [PATCH 135/186] update comment --- artisan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artisan b/artisan index be54681972c..ac5f437d464 100755 --- a/artisan +++ b/artisan @@ -24,8 +24,8 @@ require __DIR__.'/vendor/autoload.php'; |-------------------------------------------------------------------------- | | When we run the console application, the current CLI command will be -| executed in this console and the response sent back to a terminal -| or another output device for the developers. Here goes nothing! +| executed by an Artisan command and the exit code is given back to +| the caller. Once the command is handled, the script terminates. | */ From c2243d44ca71f913e6dab3aa78f5a2474ae8bc4c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:26:52 -0500 Subject: [PATCH 136/186] app config comment review --- config/app.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/app.php b/config/app.php index 786b5db4e8c..560db221b01 100644 --- a/config/app.php +++ b/config/app.php @@ -10,7 +10,7 @@ | Application Name |-------------------------------------------------------------------------- | - | This value is the name of your application. This value is used when the + | This value is the name of your application, which will be used when the | framework needs to place the application's name in a notification or | any other location as required by the application or its packages. | @@ -65,8 +65,8 @@ |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. + | will be used by the PHP date and date-time functions. The timezone + | is set to "UTC" by default as it is suitable for most use cases. | */ @@ -116,9 +116,9 @@ | Encryption Key |-------------------------------------------------------------------------- | - | This key is used by the Illuminate encrypter service and should be set + | This key is utilized by Laravel's encryption services and shold be set | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! + | will not be safe. Please do this before deploying an application. | */ From efd5721eb979211d5631c77b98908f1852a94275 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:30:13 -0500 Subject: [PATCH 137/186] auth config file comments --- config/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/auth.php b/config/auth.php index 9548c15de94..08318505acf 100644 --- a/config/auth.php +++ b/config/auth.php @@ -25,7 +25,7 @@ | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. + | which utilizes session storage plus the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage @@ -105,7 +105,7 @@ |-------------------------------------------------------------------------- | | Here you may define the amount of seconds before a password confirmation - | times out and the user is prompted to re-enter their password via the + | window expires and users are asked to re-enter their password via the | confirmation screen. By default, the timeout lasts for three hours. | */ From e753ef620f10434f0999abb03cfaef54d0ad1158 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:32:43 -0500 Subject: [PATCH 138/186] cache config file comments --- config/cache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/cache.php b/config/cache.php index d4171e2212c..1b1e6a1a8cf 100644 --- a/config/cache.php +++ b/config/cache.php @@ -9,9 +9,9 @@ | Default Cache Store |-------------------------------------------------------------------------- | - | This option controls the default cache connection that gets used while - | using this caching library. This connection is used when another is - | not explicitly specified when executing a given caching function. + | This option controls the default cache store that will be used by the + | framework. This connection is utilized if another isn't explicitly + | specified when running a cache operation inside the application. | */ From 55997edc0b19e8818ea6f0acaeddc84b137b22ff Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:34:32 -0500 Subject: [PATCH 139/186] database file comments --- config/database.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/config/database.php b/config/database.php index 137ad18ce38..d69c4aef26c 100644 --- a/config/database.php +++ b/config/database.php @@ -11,7 +11,7 @@ | | Here you may specify which of the database connections below you wish | to use as your default connection for all database work. Of course - | you may use many connections at once using the Database library. + | you may use many connections at once throughout the application. | */ @@ -24,12 +24,7 @@ | | Here are each of the database connections setup for your application. | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. + | supported by Laravel is shown below to assist your development. | */ From 585ecf6ee37017bfeae7e60308268768c0670302 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:35:09 -0500 Subject: [PATCH 140/186] filesystem comments --- config/filesystems.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filesystems.php b/config/filesystems.php index e9d9dbdbe8a..21ad5c8bdb4 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -9,7 +9,7 @@ | | Here you may specify the default filesystem disk that should be used | by the framework. The "local" disk, as well as a variety of cloud - | based disks are available to your application. Just store away! + | based disks are available to your application for file storage. | */ From 19236b8d11c95ab24ed33b09088ca4bb268f21f3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:39:03 -0500 Subject: [PATCH 141/186] mail config comments --- config/mail.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/mail.php b/config/mail.php index f32d5609c16..6ae6b79116f 100644 --- a/config/mail.php +++ b/config/mail.php @@ -25,7 +25,7 @@ | you and you are free to add your own as your application requires. | | Laravel supports a variety of mail "transport" drivers to be used while - | sending an e-mail. You will specify which one you are using for your + | delivering an email. You may specify which one you're using for your | mailers below. You are free to add additional mailers as required. | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", @@ -93,9 +93,9 @@ | Global "From" Address |-------------------------------------------------------------------------- | - | You may wish for all e-mails sent by your application to be sent from + | You may wish for all emails sent by your application to be sent from | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. + | used globally for all emails that are sent by your application. | */ From ae4811d1929fa9afdd428cbee8dfe066e824606d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 25 May 2023 15:39:45 -0500 Subject: [PATCH 142/186] mail config comments --- config/mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/mail.php b/config/mail.php index 6ae6b79116f..f21e8e70b4f 100644 --- a/config/mail.php +++ b/config/mail.php @@ -94,7 +94,7 @@ |-------------------------------------------------------------------------- | | You may wish for all emails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is + | the same address. Here you may specify a name and address that is | used globally for all emails that are sent by your application. | */ From 8fd29a57e8d9d6a3fa49efc741089656ab1a1959 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 31 May 2023 10:41:48 -0500 Subject: [PATCH 143/186] use named route instead of constant --- app/Http/Middleware/RedirectIfAuthenticated.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index e67219c833c..7ef6e8bfa90 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -2,7 +2,6 @@ namespace App\Http\Middleware; -use App\Providers\RouteServiceProvider; use Illuminate\Auth\Middleware\RedirectIfAuthenticated as Middleware; use Illuminate\Http\Request; @@ -13,6 +12,6 @@ class RedirectIfAuthenticated extends Middleware */ protected function redirectTo(Request $request): ?string { - return RouteServiceProvider::HOME; + return route('dashboard'); } } From 33286b690b3e5453f49f439f3b5152b500fcd8da Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 31 May 2023 10:57:28 -0500 Subject: [PATCH 144/186] updating comments --- config/session.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/config/session.php b/config/session.php index 8fed97c0141..6593a7ec900 100644 --- a/config/session.php +++ b/config/session.php @@ -9,9 +9,9 @@ | Default Session Driver |-------------------------------------------------------------------------- | - | This option controls the default session "driver" that will be used on - | requests. By default, we will use the lightweight native driver but - | you may specify any of the other wonderful drivers provided here. + | This option controls the default session "driver" that will be used by + | incoming requests. Laravel supports a variety of storage drivers to + | choose from for session storage. File storage is used by default. | | Supported: "file", "cookie", "database", "apc", | "memcached", "redis", "dynamodb", "array" @@ -27,7 +27,8 @@ | | Here you may specify the number of minutes that you wish the session | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. + | to expire immediately when the browser is closed then you may + | indicate that via the expire_on_close configuration option. | */ @@ -41,8 +42,8 @@ |-------------------------------------------------------------------------- | | This option allows you to easily specify that all of your session data - | should be encrypted before it is stored. All encryption will be run - | automatically by Laravel and you can use the Session like normal. + | should be encrypted before it's stored. All encryption is performed + | automatically by Laravel and you may use the session like normal. | */ @@ -53,7 +54,7 @@ | Session File Location |-------------------------------------------------------------------------- | - | When using the native session driver, we need a location where session + | When utilizing the "file" session driver, we need a spot where session | files may be stored. A default has been set for you but a different | location may be specified. This is only needed for file sessions. | From e51b442466c4435ed3ecca797f8e76008a10df57 Mon Sep 17 00:00:00 2001 From: Miguel Piedrafita Date: Fri, 2 Jun 2023 15:00:55 +0200 Subject: [PATCH 145/186] fix typo in app.php (#6189) * fix typo in app.php * Update app.php --------- Co-authored-by: Taylor Otwell --- config/app.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/app.php b/config/app.php index 560db221b01..f18082faab9 100644 --- a/config/app.php +++ b/config/app.php @@ -116,9 +116,9 @@ | Encryption Key |-------------------------------------------------------------------------- | - | This key is utilized by Laravel's encryption services and shold be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application. + | This key is utilized by Laravel's encryption services and should be set + | to a random, 32 character string; otherwise, these encrypted strings + | will not be safe. Please do this before deploying the application. | */ From 2aad92f6674cef2cbe5c17746355376603719ccf Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 16:49:15 -0500 Subject: [PATCH 146/186] pass channels in routing --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index c67001b837e..d8998ee04d3 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -16,10 +16,10 @@ */ return Application::configure() - ->withBroadcasting() ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', + channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // From 7578ae9e67c640b33d7abf3ce153a096f15d11b2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 16:57:48 -0500 Subject: [PATCH 147/186] register commands --- bootstrap/app.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/app.php b/bootstrap/app.php index d8998ee04d3..723a4795dc6 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,6 +19,7 @@ ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { From 31a7cc873e085db88a4b002a0fe48be6e8df62e7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 20:31:56 -0500 Subject: [PATCH 148/186] pass default command directory --- bootstrap/app.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap/app.php b/bootstrap/app.php index 723a4795dc6..3a2be0ea1ee 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -25,6 +25,9 @@ ->withMiddleware(function (Middleware $middleware) { // }) + ->withCommandsIn([ + __DIR__.'/../app/Console/Commands', + ]) ->withExceptionHandling(function (ExceptionHandler $handler) { // })->create(); From d0d81cf61db722a9902a4da82bf5e49546db5a46 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 20:35:56 -0500 Subject: [PATCH 149/186] update bootstrap for console commands --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 3a2be0ea1ee..68ac103f7cf 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -25,7 +25,7 @@ ->withMiddleware(function (Middleware $middleware) { // }) - ->withCommandsIn([ + ->withCommands([ __DIR__.'/../app/Console/Commands', ]) ->withExceptionHandling(function (ExceptionHandler $handler) { From 9fbf17f3eb78505187bb9c06dcee8f14c7307864 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 5 Jun 2023 21:00:50 -0500 Subject: [PATCH 150/186] initial stub of exceptions --- bootstrap/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 68ac103f7cf..c01ef771e43 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,7 +1,7 @@ withCommands([ __DIR__.'/../app/Console/Commands', ]) - ->withExceptionHandling(function (ExceptionHandler $handler) { + ->withExceptionHandling(function (Exceptions $exceptions) { // })->create(); From 929b052b71a6748402822fe73b374854b45938b3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 11:07:13 -0500 Subject: [PATCH 151/186] pass command routes in withCommands --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index c01ef771e43..f68d79d2f8e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,13 +19,13 @@ ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', - commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // }) ->withCommands([ + __DIR__.'/../routes/console.php', __DIR__.'/../app/Console/Commands', ]) ->withExceptionHandling(function (Exceptions $exceptions) { From 7877b30cdbc1ccb78ff2649103bc8efb45d97576 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 12:25:46 -0500 Subject: [PATCH 152/186] update comment --- config/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index f18082faab9..f98b852a846 100644 --- a/config/app.php +++ b/config/app.php @@ -90,9 +90,9 @@ | Application Fallback Locale |-------------------------------------------------------------------------- | - | The fallback locale determines the locale to use when the current one + | The fallback locale determines the locale to use when the default one | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. + | the languages which are currently supported by your application. | */ From b9b103d7dbbd872da38405dffde82c910e9d03b4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 12:28:40 -0500 Subject: [PATCH 153/186] update comment --- config/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index f98b852a846..580f6b5c7f4 100644 --- a/config/app.php +++ b/config/app.php @@ -117,8 +117,8 @@ |-------------------------------------------------------------------------- | | This key is utilized by Laravel's encryption services and should be set - | to a random, 32 character string; otherwise, these encrypted strings - | will not be safe. Please do this before deploying the application. + | to a random, 32 character string or all of the encrypted strings are + | not secure. You should do this prior to deploying the application. | */ From 3fe53f0163f3f883ee6212e0b8eab6879b5ead8a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 12:30:08 -0500 Subject: [PATCH 154/186] update comment --- config/app.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/app.php b/config/app.php index 580f6b5c7f4..b5cb3bd70b4 100644 --- a/config/app.php +++ b/config/app.php @@ -170,8 +170,8 @@ |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. + | is started. You may add any additional class aliases which should + | be loaded to the array. For speed, all aliases are lazy loaded. | */ From 7b850b37a6be8bb55f523ad6ec04d5574d3876ca Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 16:50:47 -0500 Subject: [PATCH 155/186] slim down commands --- bootstrap/app.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index f68d79d2f8e..b5947320916 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,15 +19,12 @@ ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', + commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // }) - ->withCommands([ - __DIR__.'/../routes/console.php', - __DIR__.'/../app/Console/Commands', - ]) ->withExceptionHandling(function (Exceptions $exceptions) { // })->create(); From 43f773d5472cbe772a7810b9905a9dc6ec2fa556 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 16:56:27 -0500 Subject: [PATCH 156/186] slim exception method --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b5947320916..d8ede7aca88 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -25,6 +25,6 @@ ->withMiddleware(function (Middleware $middleware) { // }) - ->withExceptionHandling(function (Exceptions $exceptions) { + ->withExceptions(function (Exceptions $exceptions) { // })->create(); From ff0376f564ffd23a28dc005a4eedbb4a2c96cf28 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 6 Jun 2023 17:12:51 -0500 Subject: [PATCH 157/186] update wording --- bootstrap/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index d8ede7aca88..d9b42863a4c 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -10,7 +10,7 @@ |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance -| which serves as the "glue" for all the components of Laravel. We can +| which serves as the brain for all of the Laravel components. We will | also use the application to configure core, foundational behavior. | */ From f23e9de8b2be541dc4fd3e4380514ac73727989f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 7 Jun 2023 11:35:25 -0500 Subject: [PATCH 158/186] remove middleware that dont need to be in skeleton anymore --- app/Http/Middleware/Authenticate.php | 17 ----------------- app/Http/Middleware/RedirectIfAuthenticated.php | 17 ----------------- 2 files changed, 34 deletions(-) delete mode 100644 app/Http/Middleware/Authenticate.php delete mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 63a433e524f..00000000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,17 +0,0 @@ - Date: Wed, 7 Jun 2023 17:14:05 -0500 Subject: [PATCH 159/186] no need to extend any base controller --- app/Http/Controllers/Controller.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 3584dcdb8bf..88a4821d878 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,9 +2,7 @@ namespace App\Http\Controllers; -use Illuminate\Routing\Controller as BaseController; - -class Controller extends BaseController +class Controller { // } From f1d667aaa0c0429606cef5795e750370325cb699 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 17:48:19 -0500 Subject: [PATCH 160/186] fix env var names for cache and broadcast --- .env.example | 4 ++-- config/broadcasting.php | 2 +- config/cache.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index ea0665b0a60..324ff6ba339 100644 --- a/.env.example +++ b/.env.example @@ -15,8 +15,8 @@ DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD= -BROADCAST_DRIVER=log -CACHE_DRIVER=file +BROADCAST_CONNECTION=log +CACHE_STORE=file FILESYSTEM_DISK=local QUEUE_CONNECTION=sync SESSION_DRIVER=file diff --git a/config/broadcasting.php b/config/broadcasting.php index 2410485384e..c3e2934f1f9 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -15,7 +15,7 @@ | */ - 'default' => env('BROADCAST_DRIVER', 'null'), + 'default' => env('BROADCAST_CONNECTION', 'null'), /* |-------------------------------------------------------------------------- diff --git a/config/cache.php b/config/cache.php index 1b1e6a1a8cf..48b7bf7a850 100644 --- a/config/cache.php +++ b/config/cache.php @@ -15,7 +15,7 @@ | */ - 'default' => env('CACHE_DRIVER', 'file'), + 'default' => env('CACHE_STORE', 'file'), /* |-------------------------------------------------------------------------- From fd5ffff3f95c061ba54c8d9f48da885eb2d54a06 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 17:50:34 -0500 Subject: [PATCH 161/186] let default queue driver be database --- .env.example | 2 +- config/queue.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 324ff6ba339..9209ee83803 100644 --- a/.env.example +++ b/.env.example @@ -18,7 +18,7 @@ DB_PASSWORD= BROADCAST_CONNECTION=log CACHE_STORE=file FILESYSTEM_DISK=local -QUEUE_CONNECTION=sync +QUEUE_CONNECTION=database SESSION_DRIVER=file SESSION_LIFETIME=120 diff --git a/config/queue.php b/config/queue.php index 55288fc9396..638cd3393c8 100644 --- a/config/queue.php +++ b/config/queue.php @@ -13,7 +13,7 @@ | */ - 'default' => env('QUEUE_CONNECTION', 'sync'), + 'default' => env('QUEUE_CONNECTION', 'database'), /* |-------------------------------------------------------------------------- From 3f12955ff1ea0612db2f5870a021d4d2b7bb9f9e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 18:59:05 -0500 Subject: [PATCH 162/186] add more env vars --- .env.example | 8 ++++++++ config/app.php | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index 9209ee83803..7a7828052f6 100644 --- a/.env.example +++ b/.env.example @@ -2,8 +2,16 @@ APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true +APP_TIMEZONE=UTC APP_URL=http://localhost +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US + +APP_MAINTENANCE_DRIVER=file +APP_MAINTENANCE_STORE=redis + LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug diff --git a/config/app.php b/config/app.php index b5cb3bd70b4..381c4354a61 100644 --- a/config/app.php +++ b/config/app.php @@ -70,7 +70,7 @@ | */ - 'timezone' => 'UTC', + 'timezone' => env('APP_TIMEZONE', 'UTC'), /* |-------------------------------------------------------------------------- @@ -83,7 +83,7 @@ | */ - 'locale' => 'en', + 'locale' => env('APP_LOCALE', 'en'), /* |-------------------------------------------------------------------------- @@ -96,7 +96,7 @@ | */ - 'fallback_locale' => 'en', + 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), /* |-------------------------------------------------------------------------- @@ -109,7 +109,7 @@ | */ - 'faker_locale' => 'en_US', + 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), /* |-------------------------------------------------------------------------- @@ -140,8 +140,8 @@ */ 'maintenance' => [ - 'driver' => 'file', - // 'store' => 'redis', + 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), + 'store' => env('APP_MAINTENANCE_STORE', 'redis'), ], /* From 091741e334bdd68703cb513e6b1ac3b00e55f6f7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 19:52:47 -0500 Subject: [PATCH 163/186] remove most config files by default --- .env.example | 1 + config/app.php | 155 ------------------------------ config/auth.php | 115 ----------------------- config/broadcasting.php | 71 -------------- config/cache.php | 111 ---------------------- config/cors.php | 34 ------- config/database.php | 146 ----------------------------- config/filesystems.php | 76 --------------- config/hashing.php | 52 ----------- config/logging.php | 131 -------------------------- config/mail.php | 126 ------------------------- config/queue.php | 111 ---------------------- config/services.php | 34 ------- config/session.php | 202 ---------------------------------------- config/view.php | 36 ------- 15 files changed, 1 insertion(+), 1400 deletions(-) delete mode 100644 config/auth.php delete mode 100644 config/broadcasting.php delete mode 100644 config/cache.php delete mode 100644 config/cors.php delete mode 100644 config/database.php delete mode 100644 config/filesystems.php delete mode 100644 config/hashing.php delete mode 100644 config/logging.php delete mode 100644 config/mail.php delete mode 100644 config/queue.php delete mode 100644 config/services.php delete mode 100644 config/session.php delete mode 100644 config/view.php diff --git a/.env.example b/.env.example index 7a7828052f6..535c2795eb5 100644 --- a/.env.example +++ b/.env.example @@ -13,6 +13,7 @@ APP_MAINTENANCE_DRIVER=file APP_MAINTENANCE_STORE=redis LOG_CHANNEL=stack +LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug diff --git a/config/app.php b/config/app.php index 381c4354a61..7717c62dc19 100644 --- a/config/app.php +++ b/config/app.php @@ -1,149 +1,9 @@ env('APP_NAME', 'Laravel'), - - /* - |-------------------------------------------------------------------------- - | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services the application utilizes. Set this in your ".env" file. - | - */ - - 'env' => env('APP_ENV', 'production'), - - /* - |-------------------------------------------------------------------------- - | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | - */ - - 'debug' => (bool) env('APP_DEBUG', false), - - /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | - */ - - 'url' => env('APP_URL', 'http://localhost'), - - 'asset_url' => env('ASSET_URL'), - - /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. The timezone - | is set to "UTC" by default as it is suitable for most use cases. - | - */ - - 'timezone' => env('APP_TIMEZONE', 'UTC'), - - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - - 'locale' => env('APP_LOCALE', 'en'), - - /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the default one - | is not available. You may change the value to correspond to any of - | the languages which are currently supported by your application. - | - */ - - 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), - - /* - |-------------------------------------------------------------------------- - | Faker Locale - |-------------------------------------------------------------------------- - | - | This locale will be used by the Faker PHP library when generating fake - | data for your database seeds. For example, this will be used to get - | localized telephone numbers, street address information and more. - | - */ - - 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), - - /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is utilized by Laravel's encryption services and should be set - | to a random, 32 character string or all of the encrypted strings are - | not secure. You should do this prior to deploying the application. - | - */ - - 'key' => env('APP_KEY'), - - 'cipher' => 'AES-256-CBC', - - /* - |-------------------------------------------------------------------------- - | Maintenance Mode Driver - |-------------------------------------------------------------------------- - | - | These configuration options determine the driver used to determine and - | manage Laravel's "maintenance mode" status. The "cache" driver will - | allow maintenance mode to be controlled across multiple machines. - | - | Supported drivers: "file", "cache" - | - */ - - 'maintenance' => [ - 'driver' => env('APP_MAINTENANCE_DRIVER', 'file'), - 'store' => env('APP_MAINTENANCE_STORE', 'redis'), - ], - /* |-------------------------------------------------------------------------- | Autoloaded Service Providers @@ -164,19 +24,4 @@ // Added Service Providers (Do not remove this line)... ])->toArray(), - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. You may add any additional class aliases which should - | be loaded to the array. For speed, all aliases are lazy loaded. - | - */ - - 'aliases' => Facade::defaultAliases()->merge([ - // 'Example' => App\Facades\Example::class, - ])->toArray(), - ]; diff --git a/config/auth.php b/config/auth.php deleted file mode 100644 index 08318505acf..00000000000 --- a/config/auth.php +++ /dev/null @@ -1,115 +0,0 @@ - [ - 'guard' => 'web', - 'passwords' => 'users', - ], - - /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | which utilizes session storage plus the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session" - | - */ - - 'guards' => [ - 'web' => [ - 'driver' => 'session', - 'provider' => 'users', - ], - ], - - /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | - */ - - 'providers' => [ - 'users' => [ - 'driver' => 'eloquent', - 'model' => App\Models\User::class, - ], - - // 'users' => [ - // 'driver' => 'database', - // 'table' => 'users', - // ], - ], - - /* - |-------------------------------------------------------------------------- - | Resetting Passwords - |-------------------------------------------------------------------------- - | - | You may specify multiple password reset configurations if you have more - | than one user table or model in the application and you want to have - | separate password reset settings based on the specific user types. - | - | The expiry time is the number of minutes that each reset token will be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | - | The throttle setting is the number of seconds a user must wait before - | generating more password reset tokens. This prevents the user from - | quickly generating a very large amount of password reset tokens. - | - */ - - 'passwords' => [ - 'users' => [ - 'provider' => 'users', - 'table' => 'password_reset_tokens', - 'expire' => 60, - 'throttle' => 60, - ], - ], - - /* - |-------------------------------------------------------------------------- - | Password Confirmation Timeout - |-------------------------------------------------------------------------- - | - | Here you may define the amount of seconds before a password confirmation - | window expires and users are asked to re-enter their password via the - | confirmation screen. By default, the timeout lasts for three hours. - | - */ - - 'password_timeout' => 10800, - -]; diff --git a/config/broadcasting.php b/config/broadcasting.php deleted file mode 100644 index c3e2934f1f9..00000000000 --- a/config/broadcasting.php +++ /dev/null @@ -1,71 +0,0 @@ - env('BROADCAST_CONNECTION', 'null'), - - /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | - */ - - 'connections' => [ - - 'pusher' => [ - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'secret' => env('PUSHER_APP_SECRET'), - 'app_id' => env('PUSHER_APP_ID'), - 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', - 'port' => env('PUSHER_PORT', 443), - 'scheme' => env('PUSHER_SCHEME', 'https'), - 'encrypted' => true, - 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', - ], - 'client_options' => [ - // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html - ], - ], - - 'ably' => [ - 'driver' => 'ably', - 'key' => env('ABLY_KEY'), - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - ], - - 'log' => [ - 'driver' => 'log', - ], - - 'null' => [ - 'driver' => 'null', - ], - - ], - -]; diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index 48b7bf7a850..00000000000 --- a/config/cache.php +++ /dev/null @@ -1,111 +0,0 @@ - env('CACHE_STORE', 'file'), - - /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | - | Supported drivers: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb", "octane", "null" - | - */ - - 'stores' => [ - - 'apc' => [ - 'driver' => 'apc', - ], - - 'array' => [ - 'driver' => 'array', - 'serialize' => false, - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'cache', - 'connection' => null, - 'lock_connection' => null, - ], - - 'file' => [ - 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), - 'lock_path' => storage_path('framework/cache/data'), - ], - - 'memcached' => [ - 'driver' => 'memcached', - 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ - env('MEMCACHED_USERNAME'), - env('MEMCACHED_PASSWORD'), - ], - 'options' => [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, - ], - 'servers' => [ - [ - 'host' => env('MEMCACHED_HOST', '127.0.0.1'), - 'port' => env('MEMCACHED_PORT', 11211), - 'weight' => 100, - ], - ], - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'cache', - 'lock_connection' => 'default', - ], - - 'dynamodb' => [ - 'driver' => 'dynamodb', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), - 'endpoint' => env('DYNAMODB_ENDPOINT'), - ], - - 'octane' => [ - 'driver' => 'octane', - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing the APC, database, memcached, Redis, or DynamoDB cache - | stores there might be other applications using the same cache. For - | that reason, you may prefix every cache key to avoid collisions. - | - */ - - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), - -]; diff --git a/config/cors.php b/config/cors.php deleted file mode 100644 index 8a39e6daa63..00000000000 --- a/config/cors.php +++ /dev/null @@ -1,34 +0,0 @@ - ['api/*', 'sanctum/csrf-cookie'], - - 'allowed_methods' => ['*'], - - 'allowed_origins' => ['*'], - - 'allowed_origins_patterns' => [], - - 'allowed_headers' => ['*'], - - 'exposed_headers' => [], - - 'max_age' => 0, - - 'supports_credentials' => false, - -]; diff --git a/config/database.php b/config/database.php deleted file mode 100644 index d69c4aef26c..00000000000 --- a/config/database.php +++ /dev/null @@ -1,146 +0,0 @@ - env('DB_CONNECTION', 'mysql'), - - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to assist your development. - | - */ - - 'connections' => [ - - 'sqlite' => [ - 'driver' => 'sqlite', - 'url' => env('DATABASE_URL'), - 'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'prefix' => '', - 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), - ], - - 'mysql' => [ - 'driver' => 'mysql', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'prefix' => '', - 'prefix_indexes' => true, - 'strict' => true, - 'engine' => null, - 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), - ]) : [], - ], - - 'pgsql' => [ - 'driver' => 'pgsql', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'prefix_indexes' => true, - 'search_path' => 'public', - 'sslmode' => 'prefer', - ], - - 'sqlsrv' => [ - 'driver' => 'sqlsrv', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'prefix_indexes' => true, - // 'encrypt' => env('DB_ENCRYPT', 'yes'), - // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | - */ - - 'migrations' => 'migrations', - - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer body of commands than a typical key-value system - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ - - 'redis' => [ - - 'client' => env('REDIS_CLIENT', 'phpredis'), - - 'options' => [ - 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), - ], - - 'default' => [ - 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'username' => env('REDIS_USERNAME'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_DB', '0'), - ], - - 'cache' => [ - 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'username' => env('REDIS_USERNAME'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_CACHE_DB', '1'), - ], - - ], - -]; diff --git a/config/filesystems.php b/config/filesystems.php deleted file mode 100644 index 21ad5c8bdb4..00000000000 --- a/config/filesystems.php +++ /dev/null @@ -1,76 +0,0 @@ - env('FILESYSTEM_DISK', 'local'), - - /* - |-------------------------------------------------------------------------- - | Filesystem Disks - |-------------------------------------------------------------------------- - | - | Here you may configure as many filesystem "disks" as you wish, and you - | may even configure multiple disks of the same driver. Defaults have - | been set up for each driver as an example of the required values. - | - | Supported Drivers: "local", "ftp", "sftp", "s3" - | - */ - - 'disks' => [ - - 'local' => [ - 'driver' => 'local', - 'root' => storage_path('app'), - 'throw' => false, - ], - - 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', - 'visibility' => 'public', - 'throw' => false, - ], - - 's3' => [ - 'driver' => 's3', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION'), - 'bucket' => env('AWS_BUCKET'), - 'url' => env('AWS_URL'), - 'endpoint' => env('AWS_ENDPOINT'), - 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), - 'throw' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Symbolic Links - |-------------------------------------------------------------------------- - | - | Here you may configure the symbolic links that will be created when the - | `storage:link` Artisan command is executed. The array keys should be - | the locations of the links and the values should be their targets. - | - */ - - 'links' => [ - public_path('storage') => storage_path('app/public'), - ], - -]; diff --git a/config/hashing.php b/config/hashing.php deleted file mode 100644 index bcd3be4c28a..00000000000 --- a/config/hashing.php +++ /dev/null @@ -1,52 +0,0 @@ - 'bcrypt', - - /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'bcrypt' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), - ], - - /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'argon' => [ - 'memory' => 65536, - 'threads' => 1, - 'time' => 4, - ], - -]; diff --git a/config/logging.php b/config/logging.php deleted file mode 100644 index c44d27639aa..00000000000 --- a/config/logging.php +++ /dev/null @@ -1,131 +0,0 @@ - env('LOG_CHANNEL', 'stack'), - - /* - |-------------------------------------------------------------------------- - | Deprecations Log Channel - |-------------------------------------------------------------------------- - | - | This option controls the log channel that should be used to log warnings - | regarding deprecated PHP and library features. This allows you to get - | your application ready for upcoming major versions of dependencies. - | - */ - - 'deprecations' => [ - 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), - 'trace' => false, - ], - - /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | - */ - - 'channels' => [ - 'stack' => [ - 'driver' => 'stack', - 'channels' => ['single'], - 'ignore_exceptions' => false, - ], - - 'single' => [ - 'driver' => 'single', - 'path' => storage_path('logs/laravel.log'), - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - - 'daily' => [ - 'driver' => 'daily', - 'path' => storage_path('logs/laravel.log'), - 'level' => env('LOG_LEVEL', 'debug'), - 'days' => 14, - 'replace_placeholders' => true, - ], - - 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), - 'username' => 'Laravel Log', - 'emoji' => ':boom:', - 'level' => env('LOG_LEVEL', 'critical'), - 'replace_placeholders' => true, - ], - - 'papertrail' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), - 'handler_with' => [ - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'stderr' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => StreamHandler::class, - 'formatter' => env('LOG_STDERR_FORMATTER'), - 'with' => [ - 'stream' => 'php://stderr', - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'syslog' => [ - 'driver' => 'syslog', - 'level' => env('LOG_LEVEL', 'debug'), - 'facility' => LOG_USER, - 'replace_placeholders' => true, - ], - - 'errorlog' => [ - 'driver' => 'errorlog', - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - - 'null' => [ - 'driver' => 'monolog', - 'handler' => NullHandler::class, - ], - - 'emergency' => [ - 'path' => storage_path('logs/laravel.log'), - ], - ], - -]; diff --git a/config/mail.php b/config/mail.php deleted file mode 100644 index f21e8e70b4f..00000000000 --- a/config/mail.php +++ /dev/null @@ -1,126 +0,0 @@ - env('MAIL_MAILER', 'smtp'), - - /* - |-------------------------------------------------------------------------- - | Mailer Configurations - |-------------------------------------------------------------------------- - | - | Here you may configure all of the mailers used by your application plus - | their respective settings. Several examples have been configured for - | you and you are free to add your own as your application requires. - | - | Laravel supports a variety of mail "transport" drivers to be used while - | delivering an email. You may specify which one you're using for your - | mailers below. You are free to add additional mailers as required. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", - | "postmark", "log", "array", "failover" - | - */ - - 'mailers' => [ - 'smtp' => [ - 'transport' => 'smtp', - 'url' => env('MAIL_URL'), - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - 'port' => env('MAIL_PORT', 587), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'username' => env('MAIL_USERNAME'), - 'password' => env('MAIL_PASSWORD'), - 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN'), - ], - - 'ses' => [ - 'transport' => 'ses-v2', - ], - - 'mailgun' => [ - 'transport' => 'mailgun', - // 'client' => [ - // 'timeout' => 5, - // ], - ], - - 'postmark' => [ - 'transport' => 'postmark', - // 'message_stream_id' => null, - // 'client' => [ - // 'timeout' => 5, - // ], - ], - - 'sendmail' => [ - 'transport' => 'sendmail', - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), - ], - - 'log' => [ - 'transport' => 'log', - 'channel' => env('MAIL_LOG_CHANNEL'), - ], - - 'array' => [ - 'transport' => 'array', - ], - - 'failover' => [ - 'transport' => 'failover', - 'mailers' => [ - 'smtp', - 'log', - ], - ], - ], - - /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all emails sent by your application to be sent from - | the same address. Here you may specify a name and address that is - | used globally for all emails that are sent by your application. - | - */ - - 'from' => [ - 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), - 'name' => env('MAIL_FROM_NAME', 'Example'), - ], - - /* - |-------------------------------------------------------------------------- - | Markdown Mail Settings - |-------------------------------------------------------------------------- - | - | If you are using Markdown based email rendering, you may configure your - | theme and component paths here, allowing you to customize the design - | of the emails. Or, you may simply stick with the Laravel defaults! - | - */ - - 'markdown' => [ - 'theme' => 'default', - - 'paths' => [ - resource_path('views/vendor/mail'), - ], - ], - -]; diff --git a/config/queue.php b/config/queue.php deleted file mode 100644 index 638cd3393c8..00000000000 --- a/config/queue.php +++ /dev/null @@ -1,111 +0,0 @@ - env('QUEUE_CONNECTION', 'database'), - - /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" - | - */ - - 'connections' => [ - - 'sync' => [ - 'driver' => 'sync', - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'retry_after' => 90, - 'after_commit' => false, - ], - - 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 90, - 'block_for' => 0, - 'after_commit' => false, - ], - - 'sqs' => [ - 'driver' => 'sqs', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'default'), - 'suffix' => env('SQS_SUFFIX'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'after_commit' => false, - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => env('REDIS_QUEUE', 'default'), - 'retry_after' => 90, - 'block_for' => null, - 'after_commit' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Job Batching - |-------------------------------------------------------------------------- - | - | The following options configure the database and table that store job - | batching information. These options can be updated to any database - | connection and table which has been defined by your application. - | - */ - - 'batching' => [ - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'job_batches', - ], - - /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control how and where failed jobs are stored. Laravel ships with - | support for storing failed jobs in a simple file or in a database. - | - | Supported drivers: "database-uuids", "dynamodb", "file", "null" - | - */ - - 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', - ], - -]; diff --git a/config/services.php b/config/services.php deleted file mode 100644 index 0ace530e8d2..00000000000 --- a/config/services.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'domain' => env('MAILGUN_DOMAIN'), - 'secret' => env('MAILGUN_SECRET'), - 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), - 'scheme' => 'https', - ], - - 'postmark' => [ - 'token' => env('POSTMARK_TOKEN'), - ], - - 'ses' => [ - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - ], - -]; diff --git a/config/session.php b/config/session.php deleted file mode 100644 index 6593a7ec900..00000000000 --- a/config/session.php +++ /dev/null @@ -1,202 +0,0 @@ - env('SESSION_DRIVER', 'file'), - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to expire immediately when the browser is closed then you may - | indicate that via the expire_on_close configuration option. - | - */ - - 'lifetime' => env('SESSION_LIFETIME', 120), - - 'expire_on_close' => false, - - /* - |-------------------------------------------------------------------------- - | Session Encryption - |-------------------------------------------------------------------------- - | - | This option allows you to easily specify that all of your session data - | should be encrypted before it's stored. All encryption is performed - | automatically by Laravel and you may use the session like normal. - | - */ - - 'encrypt' => false, - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When utilizing the "file" session driver, we need a spot where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => storage_path('framework/sessions'), - - /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" or "redis" session drivers, you may specify a - | connection that should be used to manage these sessions. This should - | correspond to a connection in your database configuration options. - | - */ - - 'connection' => env('SESSION_CONNECTION'), - - /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | - */ - - 'table' => 'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Cache Store - |-------------------------------------------------------------------------- - | - | While using one of the framework's cache driven session backends you may - | list a cache store that should be used for these sessions. This value - | must match with one of the application's configured cache "stores". - | - | Affects: "apc", "dynamodb", "memcached", "redis" - | - */ - - 'store' => env('SESSION_STORE'), - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => [2, 100], - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - - 'cookie' => env( - 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_').'_session' - ), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => env('SESSION_DOMAIN'), - - /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you when it can't be done securely. - | - */ - - 'secure' => env('SESSION_SECURE_COOKIE'), - - /* - |-------------------------------------------------------------------------- - | HTTP Access Only - |-------------------------------------------------------------------------- - | - | Setting this value to true will prevent JavaScript from accessing the - | value of the cookie and the cookie will only be accessible through - | the HTTP protocol. You are free to modify this option if needed. - | - */ - - 'http_only' => true, - - /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | will set this value to "lax" since this is a secure default value. - | - | Supported: "lax", "strict", "none", null - | - */ - - 'same_site' => 'lax', - -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 22b8a18d325..00000000000 --- a/config/view.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - resource_path('views'), - ], - - /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | - */ - - 'compiled' => env( - 'VIEW_COMPILED_PATH', - realpath(storage_path('framework/views')) - ), - -]; From 9630e76487d384bec088a9462efbc0f11952a36f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 19:59:42 -0500 Subject: [PATCH 164/186] add redis client to env example --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index 535c2795eb5..eb6be03548c 100644 --- a/.env.example +++ b/.env.example @@ -33,6 +33,7 @@ SESSION_LIFETIME=120 MEMCACHED_HOST=127.0.0.1 +REDIS_CLIENT=phpredis REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 From 72f86d51870d16f19f56f0db20c1a79ce22fa29a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 11 Jun 2023 20:38:13 -0500 Subject: [PATCH 165/186] update comments for provider changes --- routes/api.php | 4 ++-- routes/web.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/api.php b/routes/api.php index 889937e11a5..4c4e47f556c 100644 --- a/routes/api.php +++ b/routes/api.php @@ -9,8 +9,8 @@ |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These -| routes are loaded by the RouteServiceProvider and all of them will -| be assigned to the "api" middleware group. Make something great! +| routes are loaded within the "api" middleware group which includes +| the middleware most often needed by APIs. Build something great! | */ diff --git a/routes/web.php b/routes/web.php index d259f33ea86..c4181915201 100644 --- a/routes/web.php +++ b/routes/web.php @@ -8,8 +8,8 @@ |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These -| routes are loaded by the RouteServiceProvider and all of them will -| be assigned to the "web" middleware group. Make something great! +| routes are loaded within the "web" middleware group which includes +| sessions, cookie encryption, and more. Go build something great! | */ From 89486faf9e4ecc82db67c8611ebe85c51447ff57 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Jun 2023 14:34:58 +0200 Subject: [PATCH 166/186] slim providers --- bootstrap/app.php | 4 ++++ bootstrap/cache/.gitignore | 1 + config/app.php | 24 +----------------------- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index d9b42863a4c..b70a111c804 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,5 +1,6 @@ withProviders([ + AppServiceProvider::class, + ]) ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore index d6b7ef32c84..70702d337dd 100644 --- a/bootstrap/cache/.gitignore +++ b/bootstrap/cache/.gitignore @@ -1,2 +1,3 @@ * !.gitignore +!package-providers.php diff --git a/config/app.php b/config/app.php index 7717c62dc19..3ac44ad1013 100644 --- a/config/app.php +++ b/config/app.php @@ -1,27 +1,5 @@ ServiceProvider::defaultProviders()->merge([ - // Package Service Providers... - ])->merge([ - // Application Service Providers... - App\Providers\AppServiceProvider::class, - ])->merge([ - // Added Service Providers (Do not remove this line)... - ])->toArray(), - + // ]; From 8ddf84c5ef3d2b328430730e4f389f710474da7b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Jun 2023 14:37:37 +0200 Subject: [PATCH 167/186] slim providers work --- bootstrap/cache/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore index 70702d337dd..d6b7ef32c84 100644 --- a/bootstrap/cache/.gitignore +++ b/bootstrap/cache/.gitignore @@ -1,3 +1,2 @@ * !.gitignore -!package-providers.php From e919cbd73e7cc6ddf26e705eedef98d4a66966cc Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Jun 2023 14:55:21 +0200 Subject: [PATCH 168/186] work on slim providers --- bootstrap/providers.php | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 bootstrap/providers.php diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 00000000000..0b67a5fe474 --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,3 @@ + Date: Wed, 21 Jun 2023 14:56:30 +0200 Subject: [PATCH 169/186] work on slim providers --- bootstrap/app.php | 4 +--- bootstrap/providers.php | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b70a111c804..b52c4cfa60b 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -17,9 +17,7 @@ */ return Application::configure() - ->withProviders([ - AppServiceProvider::class, - ]) + ->withProviders() ->withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 0b67a5fe474..b8b01168a58 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -1,3 +1,5 @@ Date: Wed, 21 Jun 2023 15:04:11 +0200 Subject: [PATCH 170/186] slim provider work --- bootstrap/providers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/providers.php b/bootstrap/providers.php index b8b01168a58..38b258d1855 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -1,5 +1,5 @@ Date: Wed, 21 Jun 2023 15:08:02 +0200 Subject: [PATCH 171/186] remove import --- bootstrap/app.php | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index b52c4cfa60b..db33fedaf57 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,6 +1,5 @@ Date: Wed, 21 Jun 2023 15:54:57 +0200 Subject: [PATCH 172/186] slim providers --- app/Providers/AppServiceProvider.php | 24 ------------------------ bootstrap/providers.php | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 app/Providers/AppServiceProvider.php diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php deleted file mode 100644 index 452e6b65b7a..00000000000 --- a/app/Providers/AppServiceProvider.php +++ /dev/null @@ -1,24 +0,0 @@ - Date: Tue, 27 Jun 2023 16:37:48 -0500 Subject: [PATCH 173/186] App Provider --- app/Providers/AppServiceProvider.php | 24 ++++++++++++++++++++++++ bootstrap/providers.php | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 app/Providers/AppServiceProvider.php diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php new file mode 100644 index 00000000000..452e6b65b7a --- /dev/null +++ b/app/Providers/AppServiceProvider.php @@ -0,0 +1,24 @@ + Date: Tue, 27 Jun 2023 21:38:18 +0000 Subject: [PATCH 174/186] Apply fixes from StyleCI --- bootstrap/providers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 793d3de2c46..38b258d1855 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -2,4 +2,4 @@ return [ App\Providers\AppServiceProvider::class, -]; \ No newline at end of file +]; From e2c7644fbbf8134558c32aa920822c95a8e358c8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 17:27:59 -0500 Subject: [PATCH 175/186] use cast method --- app/Models/User.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 4d7f70f568f..ef70a00e6b0 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -34,12 +34,13 @@ class User extends Authenticatable ]; /** - * The attributes that should be cast. - * - * @var array + * Get the attributes that should be cast. */ - protected $casts = [ - 'email_verified_at' => 'datetime', - 'password' => 'hashed', - ]; + protected function casts(): array + { + return [ + 'email_verified_at' => 'datetime', + 'password' => 'hashed', + ]; + } } From 9d4f62f0b8ee64b797c7c9d8a7cb40fd53a03894 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 18:25:45 -0500 Subject: [PATCH 176/186] gitkeep in config --- config/.gitkeep | 0 config/app.php | 5 ----- 2 files changed, 5 deletions(-) create mode 100644 config/.gitkeep delete mode 100644 config/app.php diff --git a/config/.gitkeep b/config/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/config/app.php b/config/app.php deleted file mode 100644 index 3ac44ad1013..00000000000 --- a/config/app.php +++ /dev/null @@ -1,5 +0,0 @@ - Date: Fri, 30 Jun 2023 19:18:47 -0500 Subject: [PATCH 177/186] remove api routes file --- bootstrap/app.php | 2 +- composer.json | 1 - routes/api.php | 19 ------------------- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 routes/api.php diff --git a/bootstrap/app.php b/bootstrap/app.php index db33fedaf57..634a3ce7d2d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -19,7 +19,7 @@ ->withProviders() ->withRouting( web: __DIR__.'/../routes/web.php', - api: __DIR__.'/../routes/api.php', + // api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', ) diff --git a/composer.json b/composer.json index 4e32fd5407d..2d3a276338a 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,6 @@ "php": "^8.2", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^11.0", - "laravel/sanctum": "dev-develop", "laravel/tinker": "dev-develop" }, "require-dev": { diff --git a/routes/api.php b/routes/api.php deleted file mode 100644 index 4c4e47f556c..00000000000 --- a/routes/api.php +++ /dev/null @@ -1,19 +0,0 @@ -get('/user', function (Request $request) { - return $request->user(); -}); From 64004c5d569c6bab8ff24e9078cd04fa7acfdcfb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 19:47:02 -0500 Subject: [PATCH 178/186] remove channels file --- bootstrap/app.php | 2 +- routes/channels.php | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 routes/channels.php diff --git a/bootstrap/app.php b/bootstrap/app.php index 634a3ce7d2d..6bec9a42b68 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -21,7 +21,7 @@ web: __DIR__.'/../routes/web.php', // api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', - channels: __DIR__.'/../routes/channels.php', + // channels: __DIR__.'/../routes/channels.php', ) ->withMiddleware(function (Middleware $middleware) { // diff --git a/routes/channels.php b/routes/channels.php deleted file mode 100644 index 5d451e1fae8..00000000000 --- a/routes/channels.php +++ /dev/null @@ -1,18 +0,0 @@ -id === (int) $id; -}); From cccc90b61221b4012626cff8c79d111a3c558fd7 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 19:50:21 -0500 Subject: [PATCH 179/186] extract echo --- resources/js/bootstrap.js | 16 +--------------- resources/js/echo.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 resources/js/echo.js diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 846d3505856..d8e28e62b8a 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -15,18 +15,4 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; * allows your team to easily build robust real-time web applications. */ -// import Echo from 'laravel-echo'; - -// import Pusher from 'pusher-js'; -// window.Pusher = Pusher; - -// window.Echo = new Echo({ -// broadcaster: 'pusher', -// key: import.meta.env.VITE_PUSHER_APP_KEY, -// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', -// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, -// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, -// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, -// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', -// enabledTransports: ['ws', 'wss'], -// }); +// import './echo'; diff --git a/resources/js/echo.js b/resources/js/echo.js new file mode 100644 index 00000000000..520887d57d4 --- /dev/null +++ b/resources/js/echo.js @@ -0,0 +1,15 @@ +import Echo from 'laravel-echo'; + +import Pusher from 'pusher-js'; +window.Pusher = Pusher; + +window.Echo = new Echo({ + broadcaster: 'pusher', + key: import.meta.env.VITE_PUSHER_APP_KEY, + cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', + wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, + wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, + wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, + forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', + enabledTransports: ['ws', 'wss'], +}); From d0a02b18a53ba2d11758a741a674f4d2335543f3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 20:12:27 -0500 Subject: [PATCH 180/186] adjust comment --- resources/js/bootstrap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index d8e28e62b8a..af8d69b7015 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,6 +1,6 @@ /** * We'll load the axios HTTP library which allows us to easily issue requests - * to our Laravel back-end. This library automatically handles sending the + * to our Laravel back end. This library automatically handles sending the * CSRF token as a header based on the value of the "XSRF" token cookie. */ @@ -12,7 +12,7 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; /** * Echo exposes an expressive API for subscribing to channels and listening * for events that are broadcast by Laravel. Echo and event broadcasting - * allows your team to easily build robust real-time web applications. + * allow your team to quickly build robust real-time web applications. */ // import './echo'; From 5b20ed8fc059ed49eb9dd39cdd6f9f94d884087c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 20:38:33 -0500 Subject: [PATCH 181/186] update comment --- tests/CreatesApplication.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index cc68301129c..0cd56d07985 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -8,7 +8,7 @@ trait CreatesApplication { /** - * Creates the application. + * Create a new application instance. */ public function createApplication(): Application { From 6bd08a5b162f168588dcd664c9e265ae686e7ae6 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 30 Jun 2023 22:02:02 -0500 Subject: [PATCH 182/186] remove has api tokens trait --- app/Models/User.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index ef70a00e6b0..04ed4706403 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -6,11 +6,10 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Laravel\Sanctum\HasApiTokens; class User extends Authenticatable { - use HasApiTokens, HasFactory, Notifiable; + use HasFactory, Notifiable; /** * The attributes that are mass assignable. From 7578ef9e58c7b9ddc8bb8e006459d2c861ffee2d Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 7 Jul 2023 17:12:30 +0200 Subject: [PATCH 183/186] echo file is not needed --- resources/js/bootstrap.js | 8 -------- resources/js/echo.js | 15 --------------- 2 files changed, 23 deletions(-) delete mode 100644 resources/js/echo.js diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index af8d69b7015..27add9e00ba 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -8,11 +8,3 @@ import axios from 'axios'; window.axios = axios; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; - -/** - * Echo exposes an expressive API for subscribing to channels and listening - * for events that are broadcast by Laravel. Echo and event broadcasting - * allow your team to quickly build robust real-time web applications. - */ - -// import './echo'; diff --git a/resources/js/echo.js b/resources/js/echo.js deleted file mode 100644 index 520887d57d4..00000000000 --- a/resources/js/echo.js +++ /dev/null @@ -1,15 +0,0 @@ -import Echo from 'laravel-echo'; - -import Pusher from 'pusher-js'; -window.Pusher = Pusher; - -window.Echo = new Echo({ - broadcaster: 'pusher', - key: import.meta.env.VITE_PUSHER_APP_KEY, - cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', - wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, - wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, - wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, - forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', - enabledTransports: ['ws', 'wss'], -}); From 3b06291fea00f8ac0b5103ddccd92550646ecd4c Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 15 Aug 2023 13:48:07 -0500 Subject: [PATCH 184/186] update comment --- resources/js/bootstrap.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 27add9e00ba..677d70b2b8b 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,7 +1,8 @@ /** - * We'll load the axios HTTP library which allows us to easily issue requests - * to our Laravel back end. This library automatically handles sending the - * CSRF token as a header based on the value of the "XSRF" token cookie. + * The axios HTTP library is used by a variety of first-party Laravel packages + * like Inertia in order to make requests to the Laravel backend. This will + * automatically handle sending the CSRF token via a header based on the + * value of the "XSRF" token cookie sent with previous HTTP responses. */ import axios from 'axios'; From 5be26b2c787d486321bedad8cbc542a4bdf69be8 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Tue, 21 Nov 2023 02:21:10 +1100 Subject: [PATCH 185/186] Makes abstract controller `abstract` (#6276) --- app/Http/Controllers/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 88a4821d878..8677cd5cabb 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -class Controller +abstract class Controller { // } From 315efb58146ed812fc6749d58717358eb021c456 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Tue, 21 Nov 2023 02:21:26 +1100 Subject: [PATCH 186/186] Uses generic annotation on `User::casts()` (#6277) --- app/Models/User.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Models/User.php b/app/Models/User.php index 04ed4706403..def621f47d6 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -34,6 +34,8 @@ class User extends Authenticatable /** * Get the attributes that should be cast. + * + * @return array */ protected function casts(): array {