app/Http/Controllers/ProjectController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\project  $project
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(project $project)
    {
        if (auth()->user()->isAdmin()){
            $data['users']=User::all();
            $data['project']=$project;
            return view('project.edit',$data);
        }
        return redirect('project');
    }
public function edit ( project $ project ) { if ( auth ( ) -> user ( ) -> isAdmin ( ) ) { $ data [ 'users' ] = User :: all ( ) ; $ data [ 'project' ] = $ project ; return view ( 'project.edit' , $ data ) ; } return redirect ( 'project' ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .