public function run() { $notification_types = [["name" => "like"], ["name" => "follow"], ["name" => "comment"], ["name" => "ownership"]]; NotificationType::truncate(); foreach ($notification_types as $notification_type) { NotificationType::create($notification_type); } }
/** * Run the database seeds. * * @return void */ public function run() { DB::table('notification_types')->delete(); $data = [['type' => 'text']]; foreach ($data as $value) { NotificationType::create($value); } }