Renamed the "slug" field in the roles table to "code" to facilitate coding standards and improve readability. This unique identifier will now be referred to as 'code' across the application, creating consistency and reducing potential confusion in the future.

!!! Since the project has not yet been launched, therefore, I do not create a new migration, but change the current one. !!!
This commit is contained in:
Leonid Nikitin 2023-07-12 22:30:05 +06:00
parent a3fa966643
commit 2121af2914
Signed by: kor-elf
GPG Key ID: 7DE8F80C5CEC2C0D

View File

@ -18,14 +18,14 @@ return new class extends Migration
Schema::create('roles', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug')->unique();
$table->string('code')->unique();
$table->timestamps();
$table->softDeletes();
});
DB::table('roles')->insert([
'name' => 'Administrator',
'slug' => 'admin',
'code' => 'admin',
'created_at' => Carbon::now(),
'updated_at' => Carbon::now()
]);