Skip to content

Commit a8ffa66

Browse files
authored
Laravel 12 (#103)
* Upgrade to Laravel 12 * Remove unnecessary config * Use backed enums where possible
1 parent 92398b7 commit a8ffa66

16 files changed

+38
-1546
lines changed

app/Providers/AuthServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function boot(): void
1818
{
1919
// @codeCoverageIgnoreStart
2020
Gate::define('viewPulse', function (User $user) {
21-
return $user->hasRole(Role::SUPER_ADMIN->value);
21+
return $user->hasRole(Role::SUPER_ADMIN);
2222
});
2323
// @codeCoverageIgnoreEnd
2424
}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"althinect/filament-spatie-roles-permissions": "^2.2",
99
"filament/filament": "^3.2",
1010
"inertiajs/inertia-laravel": "^2.0",
11-
"laravel/framework": "^11.17",
11+
"laravel/framework": "^12.0",
1212
"laravel/pulse": "^1.2",
1313
"laravel/sanctum": "^4.0",
1414
"laravel/tinker": "^2.9",

composer.lock

+33-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

-120
Original file line numberDiff line numberDiff line change
@@ -21,125 +21,5 @@
2121
],
2222
],
2323

24-
/*
25-
|--------------------------------------------------------------------------
26-
| Application Name
27-
|--------------------------------------------------------------------------
28-
|
29-
| This value is the name of your application, which will be used when the
30-
| framework needs to place the application's name in a notification or
31-
| other UI elements where an application name needs to be displayed.
32-
|
33-
*/
34-
35-
'name' => env('APP_NAME', 'Laravel'),
36-
37-
/*
38-
|--------------------------------------------------------------------------
39-
| Application Environment
40-
|--------------------------------------------------------------------------
41-
|
42-
| This value determines the "environment" your application is currently
43-
| running in. This may determine how you prefer to configure various
44-
| services the application utilizes. Set this in your ".env" file.
45-
|
46-
*/
47-
4824
'env' => env('APP_ENV', Environment::PRODUCTION->value),
49-
50-
/*
51-
|--------------------------------------------------------------------------
52-
| Application Debug Mode
53-
|--------------------------------------------------------------------------
54-
|
55-
| When your application is in debug mode, detailed error messages with
56-
| stack traces will be shown on every error that occurs within your
57-
| application. If disabled, a simple generic error page is shown.
58-
|
59-
*/
60-
61-
'debug' => (bool) env('APP_DEBUG', false),
62-
63-
/*
64-
|--------------------------------------------------------------------------
65-
| Application URL
66-
|--------------------------------------------------------------------------
67-
|
68-
| This URL is used by the console to properly generate URLs when using
69-
| the Artisan command line tool. You should set this to the root of
70-
| the application so that it's available within Artisan commands.
71-
|
72-
*/
73-
74-
'url' => env('APP_URL', 'http://localhost'),
75-
76-
/*
77-
|--------------------------------------------------------------------------
78-
| Application Timezone
79-
|--------------------------------------------------------------------------
80-
|
81-
| Here you may specify the default timezone for your application, which
82-
| will be used by the PHP date and date-time functions. The timezone
83-
| is set to "UTC" by default as it is suitable for most use cases.
84-
|
85-
*/
86-
87-
'timezone' => env('APP_TIMEZONE', 'UTC'),
88-
89-
/*
90-
|--------------------------------------------------------------------------
91-
| Application Locale Configuration
92-
|--------------------------------------------------------------------------
93-
|
94-
| The application locale determines the default locale that will be used
95-
| by Laravel's translation / localization methods. This option can be
96-
| set to any locale for which you plan to have translation strings.
97-
|
98-
*/
99-
100-
'locale' => env('APP_LOCALE', 'en'),
101-
102-
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
103-
104-
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
105-
106-
/*
107-
|--------------------------------------------------------------------------
108-
| Encryption Key
109-
|--------------------------------------------------------------------------
110-
|
111-
| This key is utilized by Laravel's encryption services and should be set
112-
| to a random, 32 character string to ensure that all encrypted values
113-
| are secure. You should do this prior to deploying the application.
114-
|
115-
*/
116-
117-
'cipher' => 'AES-256-CBC',
118-
119-
'key' => env('APP_KEY'),
120-
121-
'previous_keys' => [
122-
...array_filter(
123-
explode(',', env('APP_PREVIOUS_KEYS', ''))
124-
),
125-
],
126-
127-
/*
128-
|--------------------------------------------------------------------------
129-
| Maintenance Mode Driver
130-
|--------------------------------------------------------------------------
131-
|
132-
| These configuration options determine the driver used to determine and
133-
| manage Laravel's "maintenance mode" status. The "cache" driver will
134-
| allow maintenance mode to be controlled across multiple machines.
135-
|
136-
| Supported drivers: "file", "cache"
137-
|
138-
*/
139-
140-
'maintenance' => [
141-
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
142-
'store' => env('APP_MAINTENANCE_STORE', 'database'),
143-
],
144-
14525
];

config/auth.php

-108
This file was deleted.

0 commit comments

Comments
 (0)