public function run() { Priority::create(['title' => 'Low']); Priority::create(['title' => 'Medium']); Priority::create(['title' => 'High']); Priority::create(['title' => 'Urgent']); Priority::create(['title' => 'Critical']); }
public function run() { DB::table('priorities')->delete(); $stamp = date('Y-m-d H:i:s'); $priorities_array = array(array('priorities_name' => 'Low', 'created_at' => $stamp, 'updated_at' => $stamp), array('priorities_name' => 'Medium', 'created_at' => $stamp, 'updated_at' => $stamp), array('priorities_name' => 'High', 'created_at' => $stamp, 'updated_at' => $stamp), array('priorities_name' => 'Urgent', 'created_at' => $stamp, 'updated_at' => $stamp)); foreach ($priorities_array as $added_row) { Priority::create($added_row); } }