public function forcedelete($id, DeleteRequest $request)
 {
     try {
         $model = $this->getModel($id);
         DB::transaction(function () use($model) {
             $model->forcedelete();
         });
         Flash::info(trans($this->resource_name . 'deleted', ['model' => $this->model_name]));
         return redirect(route($this->index_route, []));
     } catch (Exception $e) {
         Flash::error($e->getMessage());
         return $request->response([]);
     }
 }
 public function forcedelete($id, DeleteRequest $request)
 {
     try {
         $model = $this->getModel($id);
         DB::transaction(function () use($model) {
             $model->forcedelete();
         });
         flash()->info("{$this->model_name} removed");
         return redirect(route($this->index_route));
     } catch (Exception $e) {
         flash()->error($e->getMessage());
         return $request->response([]);
     }
 }
 public function forcedelete($id, DeleteRequest $request)
 {
     try {
         $model = $this->getModel($id);
         DB::transaction(function () use($model) {
             if ($model->picture) {
                 try {
                     File::delete(base_path() . $model->picture->filename);
                 } catch (Exception $e) {
                 }
                 $model->picture->forcedelete();
             }
             $model->departments()->sync([]);
             $model->roles()->sync([]);
             $model->forcedelete();
         });
         Flash::info(trans($this->resource_name . 'deleted', ['model' => $this->model_name]));
         return redirect(route($this->index_route, []));
     } catch (Exception $e) {
         Flash::error($e->getMessage());
         return $request->response([]);
     }
 }