2f3fd laravel 11 upgrade (#436)
* fix password reset bug * upgrade to laravel 11 * composer.lock * fix migration issues * use ValidationRule Contract * rename password_resets table * implemented casts as protected function * update env variables * fix optional property * fix validation issues * use <env> on php unit xml * fix pint * cmposer.lock * composer json fixes * fix composer dependencies, remove faker * remove unused class * remove test class * fix default value for mysql migration * linting * expression syntax fix --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -36,8 +36,6 @@ class AuthServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
\Illuminate\Support\Facades\Gate::define('viewMailcoach', function ($user = null) {
|
||||
return optional($user)->admin;
|
||||
});
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Jhumanj\LaravelModelStats\LaravelModelStats;
|
||||
use Jhumanj\LaravelModelStats\ModelStatsServiceProvider as Provider;
|
||||
|
||||
class ModelStatsServiceProvider extends Provider
|
||||
{
|
||||
/**
|
||||
* Register the LaravelModelStats gate.
|
||||
*
|
||||
* This gate determines who can access ModelStats in non-local environments.
|
||||
*/
|
||||
protected function gate(): void
|
||||
{
|
||||
Gate::define('viewModelStats', function ($user) {
|
||||
return in_array($user->email, [
|
||||
'julien@notionforms.io',
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user