/**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \App\Models\Project $project
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, Project $project)
 {
     $this->middleware('auth');
     if ($project->ismember(auth()->user(), 'owner') || access()->hasRole('Administrator')) {
         $this->validate($request, $this->rules);
         $input = $this->filter_project_input();
         $input = array_except($input, '_method');
         $project->update($input);
         return Redirect::route('projects.show', $project->slug)->with('flash_success', 'Projeto atualizado.');
     } else {
         return Redirect::route('home')->with('flash_danger', 'Operação não permitida.');
     }
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \App\Models\Project $project
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, Project $project)
 {
     $this->validate($request, $this->rules);
     $input = $this->filter_project_input();
     $input = array_except($input, '_method');
     $project->update($input);
     return Redirect::route('projects.show', $project->slug)->with('flash_success', 'Projeto atualizado.');
 }