Роли, переделывание отчета, изменение на главной странице
This commit is contained in:
@@ -11,6 +11,13 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('roles', function (Blueprint $table) {
|
||||
$table->id('role_id');
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->boolean('is_active')->default(true);
|
||||
});
|
||||
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
@@ -23,6 +30,14 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('user_roles', function (Blueprint $table) {
|
||||
$table->id('user_role_id');
|
||||
$table->foreignIdFor(\App\Models\User::class, 'rf_user_id');
|
||||
$table->foreignIdFor(\App\Models\Role::class, 'rf_role_id');
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->boolean('is_default')->default(false);
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('login')->primary();
|
||||
$table->string('token');
|
||||
|
||||
Reference in New Issue
Block a user