fix login auto detect menu link, and partial update tchnician role dealer

This commit is contained in:
2025-07-09 18:32:49 +07:00
parent e468672bbe
commit e59841fd23
14 changed files with 1362 additions and 103 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoleDealerTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('role_dealer', function (Blueprint $table) {
$table->id();
$table->foreignId('role_id')->constrained()->onDelete('cascade');
$table->foreignId('dealer_id')->constrained()->onDelete('cascade');
$table->timestamps();
$table->unique(['role_id', 'dealer_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('role_dealer');
}
}

View File

@@ -59,5 +59,7 @@ class MenuSeeder extends Seeder
]
);
}
Menu::whereIn('link', ['targets.index','product-categories.index'])->delete();
}
}