Implement admin and user management foundation

This commit is contained in:
2026-03-25 00:38:30 +01:00
parent 9d90bde323
commit aeee3d2640
17 changed files with 505 additions and 25 deletions
+11
View File
@@ -2,9 +2,11 @@
namespace App\Providers;
use App\Models\User;
use Carbon\CarbonImmutable;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
use Illuminate\Validation\Rules\Password;
@@ -23,9 +25,18 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
$this->configureAuthorization();
$this->configureDefaults();
}
/**
* Configure authorization behaviors.
*/
protected function configureAuthorization(): void
{
Gate::define('access-admin', fn (User $user): bool => $user->is_admin);
}
/**
* Configure default behaviors for production-ready applications.
*/