/** * Display a listing of the resource. * * @return Response */ public function index() { $help = new Help(); $re = $help->index(); if ($re) { return view('regist'); } else { return false; } }
public function destroy($id, User $user) { $help = Help::find($id); $log = new Log(); $log->user_id = $user->id; $log->log = "删除帮助" . print_r($help->toArray(), true); $log->save(); Help::destroy($id); return redirect()->action('AdminController@getHelp'); }
function getHelp() { return view('admin.help')->withHelp(Help::orderBy('item_order')->get())->withUser($this->user); }