D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
dateitor
/
www
/
database
/
migrations
/
Filename :
2024_03_28_121829_add_affiliation_format_settings_table.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 { $setting = Setting::whereKey('affiliation_amount_type')->first(); if ($setting) { return; } Setting::create([ 'key' => 'affiliation_amount_type', 'value' => '1', ]); } /** * Reverse the migrations. */ public function down(): void { Schema::table('settings', function (Blueprint $table) { $table->dropColumn('user_verified_email'); }); } };