35 lines
1013 B
PHP
35 lines
1013 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use App\Models\Homepage;
|
|
use App\Models\Link;
|
|
use App\Models\Size;
|
|
use App\Models\Footer;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Homepage::firstOrCreate(['photo' => null, 'title' => null, 'body' => null, 'address' => null, 'opening_hours' => null, 'widget_link' => null]);
|
|
Link::firstOrCreate(['links' => null]);
|
|
Size::firstOrCreate(['small' => null, 'small_photo' => null, 'medium' => null, 'medium_photo' => null, 'large' => null, 'large_photo' => null]);
|
|
Footer::firstOrCreate(['links' => null]);
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Homepage::where('id', 1)->delete();
|
|
Link::where('id', 1)->delete();
|
|
Size::where('id', 1)->delete();
|
|
Footer::where('id', 1)->delete();
|
|
}
|
|
};
|