/** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return \Gate::authorize($this->input('id', null) ? 'update' : 'create', [$this->user(), $this->input('id')]); }