app/Http/Controllers/SuperAdmin/UserController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(StoreUserRequest $request)
    {
        $user = User::create($request->validated());
        $user->assignRole(Role::where('name', 'admin')->first());
        return redirect()->route('super.users.index');
    }
public function store ( StoreUserRequest $ request ) { $ user = User :: create ( $ request -> validated ( ) ) ; $ user -> assignRole ( Role :: where ( 'name' , 'admin' ) -> first ( ) ) ; return redirect ( ) -> route ( 'super.users.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//