Exemple #1
0
 /**
  * @param $id
  * @param $backUrl
  * @return \Illuminate\Http\RedirectResponse
  * @throws Exception
  */
 public function delete($backUrl = 'home', $id)
 {
     if (method_exists($this, 'beforeDelete')) {
         return $this->beforeDelete($id);
     }
     // Defini content
     $this->dsp->template = 'layouts.templates.user';
     $this->dsp->content = $this->dsp->delete;
     // Find
     $mod = $this->model;
     $datas = $mod::find($id);
     $delRoute = $this->prefix . '.dodelete';
     // Param delete
     $this->dsp->addVar('param', ['titre' => gl('Supression'), 'backUrl' => $backUrl, 'delRoute' => $delRoute, 'datas' => $datas]);
     return View::make('dispatch')->with(['dsp' => $this->dsp]);
 }