コード例 #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $data = array(['order' => '1', 'image' => 'images/slider-items/Banner1.jpg', 'caption' => "Slider 1 de prueba", 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['order' => '2', 'image' => 'images/slider-items/Banner2.jpg', 'caption' => "Slider 2 de prueba", 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     Slider::insert($data);
 }
コード例 #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Slider::truncate();
     $data = [['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner15.jpg'], ['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner14.jpg'], ['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner13.jpg'], ['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner12.jpg'], ['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner11.jpg'], ['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner12.jpg'], ['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner13.jpg'], ['title' => "", 'status' => 1, 'image_url' => 'frontend/images/banner14.jpg']];
     Slider::insert($data);
 }