/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $works = new Works(); $work = $works->where('id', '=', $id)->first(); $works->where('id', '=', $id)->delete(); // Remove all images $this->removeImages($work); session()->flash('flash_message', 'Сайт ' . $work->title . ' удален!'); return redirect('admin'); }