示例#1
0
 public static function delete($id)
 {
     $agama = Agama::find($id);
     if (!is_null($agama->first())) {
         return $agama->delete();
     } else {
         return false;
     }
 }
示例#2
0
 public function delete($id)
 {
     $ag = Agama::find($id);
     if ($ag) {
         $ag->delete();
         return Redirect::to('/dash/setting/agama');
     } else {
         Session::flash('message', "Error, Agama with {$id} not found!");
         return Redirect::to('/dash/setting/agama');
     }
 }