update to filament v4

This commit is contained in:
salam committed 2025-11-29 09:46:15 +01:00
1 parent 38e841bd73
commit 4b4c8427d8
59 files changed
+2559 -1982

No files matched your search

@@ -15,7 +15,7 @@ return new class extends Migration
$table->id();
$table->string('name');
$table->string('type');
$table->string('filetype');
$table->string('filetype')->default('json');
$table->integer('provider_id')->default(0);
$table->integer('sport_id')->default(0)->nullable();
@@ -17,8 +17,8 @@ return new class extends Migration
$pivotRole = $columnNames['role_pivot_key'] ?? 'role_id';
$pivotPermission = $columnNames['permission_pivot_key'] ?? 'permission_id';
throw_if(empty($tableNames), new Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.'));
throw_if($teams && empty($columnNames['team_foreign_key'] ?? null), new Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.'));
throw_if(empty($tableNames), Exception::class, 'Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
throw_if($teams && empty($columnNames['team_foreign_key'] ?? null), Exception::class, 'Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
Schema::create($tableNames['permissions'], static function (Blueprint $table) {
// $table->engine('InnoDB');
@@ -123,9 +123,7 @@ return new class extends Migration
{
$tableNames = config('permission.table_names');
if (empty($tableNames)) {
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
}
throw_if(empty($tableNames), Exception::class, 'Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
Schema::drop($tableNames['role_has_permissions']);
Schema::drop($tableNames['model_has_roles']);