/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { if (!$this->post->find($id)) { return App::abort(500); } $this->post->delete($id); return Redirect::back(); }
/** * Get the main admin view. * * @return \Illuminate\View\View */ public function index() { return View::make('cabinet::admin.index')->with('posts', $this->posts->all())->with('users', $this->user->all())->with('user', \Auth::user())->with('locale', $this->loadLanguage()); }