public function run() { Athomes::create(array('temperature' => '19.8', 'sensors1' => '22.2', 'sensors2' => '7.5', 'led1' => False)); Athomes::create(array('temperature' => '18.8', 'sensors1' => '22.0', 'sensors2' => '7.6', 'led1' => False)); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // delete $athome = Athomes::find($id); $athome->delete(); if (is_null($athome)) { return Response::json('Todo not found', 404); } // redirect Session::flash('message', 'Successfully deleted the nerd!'); return Redirect::to('athome'); }