示例#1
0
 public function delete($id)
 {
     try {
         return Object::destroy($id);
     } catch (\Exception $e) {
         return ['error' => $e->getMessage()];
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Object::destroy($id);
     return redirect(route('admin.objects.index'))->with('success', 'L\'objet a bien été supprimé');
 }