app/Http/Controllers/AdminUserController.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()){
            $roles = Role::where('is_admin', false)->pluck('name','id')->all();
        } else {
            $roles = Role::pluck('name','id')->all();
        }
        return view('admin.users.create', compact('roles'));
    }
public function create ( ) { if ( ! Auth :: user ( ) -> isAdmin ( ) ) { $ roles = Role :: where ( 'is_admin' , false ) -> pluck ( 'name' , 'id' ) -> all ( ) ; } else { $ roles = Role :: pluck ( 'name' , 'id' ) -> all ( ) ; } return view ( 'admin.users.create' , compact ( 'roles' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .
//