Advertisement
Guest User

Untitled

a guest
May 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?php
  2. use Illuminate\Database\Seeder;
  3. use Illuminate\Support\Facades\DB;
  4.  
  5. class ProjectsTableSeeder extends Seeder {
  6. public function run()
  7. {
  8. // Uncomment the below to wipe the table clean before populating
  9. DB::table('projects')->delete();
  10. $projects = array(
  11. ['id' => 1, 'name' => 'Project 1', 'slug' => 'project-1', 'created_at' => new DateTime, 'updated_at' => new DateTime],
  12. ['id' => 2, 'name' => 'Project 2', 'slug' => 'project-2', 'created_at' => new DateTime, 'updated_at' => new DateTime],
  13. ['id' => 3, 'name' => 'Project 3', 'slug' => 'project-3', 'created_at' => new DateTime, 'updated_at' => new DateTime],
  14. );
  15. // Uncomment the below to run the seeder
  16. DB::table('projects')->insert($projects);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement