Skip to content

Laravel 12 #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ public function boot(): void
{
// @codeCoverageIgnoreStart
Gate::define('viewPulse', function (User $user) {
return $user->hasRole(Role::SUPER_ADMIN->value);
return $user->hasRole(Role::SUPER_ADMIN);
});
// @codeCoverageIgnoreEnd
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
"althinect/filament-spatie-roles-permissions": "^2.2",
"filament/filament": "^3.2",
"inertiajs/inertia-laravel": "^2.0",
"laravel/framework": "^11.17",
"laravel/framework": "^12.0",
"laravel/pulse": "^1.2",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
66 changes: 33 additions & 33 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 0 additions & 120 deletions config/app.php
Original file line number Diff line number Diff line change
@@ -21,125 +21,5 @@
],
],

/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| 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
| other UI elements where an application name needs to be displayed.
|
*/

'name' => 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', Environment::PRODUCTION->value),

/*
|--------------------------------------------------------------------------
| 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
| the application so that it's available within Artisan commands.
|
*/

'url' => env('APP_URL', 'http://localhost'),

/*
|--------------------------------------------------------------------------
| 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 Laravel's translation / localization methods. This option can be
| set to any locale for which you plan to have translation strings.
|
*/

'locale' => env('APP_LOCALE', 'en'),

'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),

'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 to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/

'cipher' => 'AES-256-CBC',

'key' => env('APP_KEY'),

'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],

/*
|--------------------------------------------------------------------------
| 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', 'database'),
],

];
108 changes: 0 additions & 108 deletions config/auth.php

This file was deleted.

107 changes: 0 additions & 107 deletions config/cache.php

This file was deleted.

173 changes: 0 additions & 173 deletions config/database.php

This file was deleted.

76 changes: 0 additions & 76 deletions config/filesystems.php

This file was deleted.

116 changes: 0 additions & 116 deletions config/health.php
Original file line number Diff line number Diff line change
@@ -1,127 +1,11 @@
<?php

return [
/*
* A result store is responsible for saving the results of the checks. The
* `EloquentHealthResultStore` will save results in the database. You
* can use multiple stores at the same time.
*/
'result_stores' => [
Spatie\Health\ResultStores\EloquentHealthResultStore::class => [
'connection' => env('HEALTH_DB_CONNECTION', env('DB_CONNECTION')),
'model' => Spatie\Health\Models\HealthCheckResultHistoryItem::class,
'keep_history_for_days' => 5,
],

/*
Spatie\Health\ResultStores\CacheHealthResultStore::class => [
'store' => 'file',
],
Spatie\Health\ResultStores\JsonFileHealthResultStore::class => [
'disk' => 's3',
'path' => 'health.json',
],
Spatie\Health\ResultStores\InMemoryHealthResultStore::class,
*/
],

/*
* You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'.
* For Slack you need to install laravel/slack-notification-channel.
*/
'notifications' => [
/*
* Notifications will only get sent if this option is set to `true`.
*/
'enabled' => true,

'notifications' => [
Spatie\Health\Notifications\CheckFailedNotification::class => ['mail'],
],

/*
* Here you can specify the notifiable to which the notifications should be sent. The default
* notifiable will use the variables specified in this config file.
*/
'notifiable' => Spatie\Health\Notifications\Notifiable::class,

/*
* When checks start failing, you could potentially end up getting
* a notification every minute.
*
* With this setting, notifications are throttled. By default, you'll
* only get one notification per hour.
*/
'throttle_notifications_for_minutes' => 60,
'throttle_notifications_key' => 'health:latestNotificationSentAt:',

'mail' => [
'to' => env('HEALTH_CHECK_TO_ADDRESS', ''),

'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
],

'slack' => [
'webhook_url' => env('HEALTH_SLACK_WEBHOOK_URL', ''),

/*
* If this is set to null the default channel of the webhook will be used.
*/
'channel' => null,

'username' => null,

'icon' => null,
],
],

/*
* You can let Oh Dear monitor the results of all health checks. This way, you'll
* get notified of any problems even if your application goes totally down. Via
* Oh Dear, you can also have access to more advanced notification options.
*/
'oh_dear_endpoint' => [
'enabled' => false,

/*
* When this option is enabled, the checks will run before sending a response.
* Otherwise, we'll send the results from the last time the checks have run.
*/
'always_send_fresh_results' => true,

/*
* The secret that is displayed at the Application Health settings at Oh Dear.
*/
'secret' => env('OH_DEAR_HEALTH_CHECK_SECRET'),

/*
* The URL that should be configured in the Application health settings at Oh Dear.
*/
'url' => '/oh-dear-health-check-results',
],

/*
* You can set a theme for the local results page
*
* - light: light mode
* - dark: dark mode
*/
'theme' => 'light',

/*
* When enabled, completed `HealthQueueJob`s will be displayed
* in Horizon's silenced jobs screen.
*/
'silence_health_queue_job' => true,

/*
* The response code to use for HealthCheckJsonResultsController when a health
* check has failed
*/
'json_results_failure_status' => 200,
];
132 changes: 0 additions & 132 deletions config/logging.php

This file was deleted.

116 changes: 0 additions & 116 deletions config/mail.php

This file was deleted.

186 changes: 0 additions & 186 deletions config/permission.php

This file was deleted.

112 changes: 0 additions & 112 deletions config/queue.php

This file was deleted.

45 changes: 0 additions & 45 deletions config/services.php

This file was deleted.

217 changes: 0 additions & 217 deletions config/session.php

This file was deleted.

6 changes: 3 additions & 3 deletions database/factories/UserFactory.php
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ public function superAdmin(?string $email = null)
'password' => \config('app.seed.users.super.password'),
])
->afterCreating(function (User $user) {
$user->assignRole(Role::SUPER_ADMIN->value);
$user->assignRole(Role::SUPER_ADMIN);
});
}

@@ -51,7 +51,7 @@ public function admin()
'password' => \config('app.seed.users.admin.password'),
])
->afterCreating(function (User $user) {
$user->assignRole(Role::ADMIN->value);
$user->assignRole(Role::ADMIN);
});
}

@@ -63,7 +63,7 @@ public function user()
'password' => \config('app.seed.users.user.password'),
])
->afterCreating(function (User $user) {
$user->assignRole(Role::USER->value);
$user->assignRole(Role::USER);
});
}
}