コード例 #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param GarbageType $garbageType
  * @return mixed
  * @throws \Exception
  */
 public function destroy(GarbageType $garbageType)
 {
     $garbageType->delete();
     return redirect()->back()->withSuccess('Status removed');
 }
コード例 #2
0
 public function run()
 {
     $types = [['name' => 'Agricultural', 'created_at' => current_time(), 'updated_at' => current_time()], ['name' => 'Electrical', 'created_at' => current_time(), 'updated_at' => current_time()], ['name' => 'Electronics', 'created_at' => current_time(), 'updated_at' => current_time()], ['name' => 'Domestic', 'created_at' => current_time(), 'updated_at' => current_time()], ['name' => 'Food', 'created_at' => current_time(), 'updated_at' => current_time()]];
     \App\GarbageType::truncate();
     \App\GarbageType::insert($types);
 }