/** * Store the grant * * @return \Illuminate\Http\RedirectResponse */ public function store() { $validator = $this->validationFactory->make($this->request->except('_token', 'submit'), $this->rules['create']); if ($validator->fails()) { return $this->redirector->back()->withInput()->withErrors($validator); } $this->grants->create($this->request->get('id')); return $this->redirector->route('oauth.grants.index')->with('success', "Grant added successfully."); }
/** * Bind grants to view. * * @param \Illuminate\View\View $view */ public function compose($view) { $view->with('grants', $this->grants->all()); }