コード例 #1
0
 /**
  * Store the scope
  *
  * @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->scopes->create($this->request->get('id'), $this->request->get('description'));
     return $this->redirector->route('oauth.scopes.index')->with('success', "Scope added successfully.");
 }
コード例 #2
0
 /**
  * Bind scopes to view.
  *
  * @param  \Illuminate\View\View  $view
  */
 public function compose($view)
 {
     $view->with('scopes', $this->scopes->all());
 }