D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
dateitor
/
www
/
database
/
migrations
/
Filename :
2023_06_16_121712_add_mobile_validation_to_settings.php
back
Copy
<?php use App\Models\Setting; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::table('settings', function (Blueprint $table) { Setting::create([ 'key' => 'mobile_validation', 'value' => false, ]); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { Setting::where('key', 'mobile_validation')->delete(); }); } };