Просмотр файла database/migrations/2023_05_07_021202_add_allow_register_to_settings.php
<?php
use App\Models\Setting;
return new class
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Setting::query()->create([
'name' => 'main.allow_register',
'value' => 1,
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
Setting::query()
->where('name', 'main.allow_register')
->delete();
}
};