BUB-17 Aggiunto gruppi e ACL per laravel

This commit is contained in:
2023-04-07 08:31:27 +02:00
parent 2ab8a63cbc
commit 723ee9fb07
18 changed files with 763 additions and 54 deletions

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePermissionsTable extends Migration
{
public function up()
{
$permissionsTable = config('acl.tables.permissions', 'permissions');
Schema::create($permissionsTable, function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('guard_name');
$table->text('description')->nullable();
$table->softDeletes();
$table->timestamps();
$table->unique(['name', 'guard_name']);
});
}
public function down()
{
$tables = config('acl.tables');
Schema::dropIfExists($tables['permissions']);
}
}