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