SHARE
TWEET

Untitled

a guest May 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top