migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Frontend\Database\Seeders;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\Authentication\Models\Restaurant;
|
||||
use Modules\Frontend\Models\Testimonial;
|
||||
|
||||
class TestimonialTableSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$restaurant = Restaurant::first();
|
||||
if (! $restaurant) {
|
||||
$this->command->info('No restaurant found! Please seed the restaurants table first.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Testimonial::create([
|
||||
'restaurant_id' => $restaurant->id,
|
||||
'name' => 'Feedback-01',
|
||||
'description' => 'I love learning here! The teachers are supportive, and the activities are fun.',
|
||||
'status' => 1,
|
||||
'ratting' => 5,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
]);
|
||||
|
||||
Testimonial::create([
|
||||
'restaurant_id' => $restaurant->id,
|
||||
'name' => 'Feedback-02',
|
||||
'description' => 'A great place to teach! The school values both customers and educators.',
|
||||
'status' => 1,
|
||||
'ratting' => 5,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
]);
|
||||
|
||||
Testimonial::create([
|
||||
'restaurant_id' => $restaurant->id,
|
||||
'name' => 'Feedback-03',
|
||||
'description' => 'The best decision for my child! Excellent education and communication.',
|
||||
'status' => 1,
|
||||
'ratting' => 5,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user