public function edit($id, User $user) { if (!($user->auth & \Config::get('admin.adminBike'))) { return response(view('errors.error', ['title' => '权限不足', 'error' => '您没有管理单车的权限!']), 403); } $options = array(); foreach (Stop::all() as $stop) { $options[$stop->id] = $stop->name; } return view('bikes.edit')->withUser($user)->withStop($options)->withBike(Bike::find($id)); }