app/Http/Controllers/Dashboard/Users.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(Request $request)
    {
         $validated = request()->validate([
            'name'     => 'required',
            'email'    => 'required',
            'password' => 'required',
            'group'    => 'required'
        ]);
        $validated['password'] = Hash::make($validated['password']) ;
        User::create($validated);
        alert()->success('User Created' , 'Done');
        return redirect()->route('users.index');
    }
public function store ( Request $ request ) { $ validated = request ( ) -> validate ( [ 'name' => 'required' , 'email' => 'required' , 'password' => 'required' , 'group' => 'required' ] ) ; $ validated [ 'password' ] = Hash :: make ( $ validated [ 'password' ] ) ; User :: create ( $ validated ) ; alert ( ) -> success ( 'User Created' , 'Done' ) ; return redirect ( ) -> route ( 'users.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// dd( $request->all() );