Version 1.0.0
This commit is contained in:
25
database/migrations/2025_04_10_113622_seed_homepage.php
Normal file
25
database/migrations/2025_04_10_113622_seed_homepage.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use App\Models\Homepage;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Homepage::firstOrCreate(['title' => 'Strona główna', 'photo' => null, 'content' => null]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Homepage::where('title', 'Strona główna')->delete();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user