public function store(StoreUserValidator $request)
    {
        $user               = new User($request->all());
        $user->password     = bcrypt($request->get('password'));
        $user->is_activated = $request->get('is_activated', false);
        $user->is_blocked   = $request->get('is_blocked', false);
        $user->is_admin     = $request->get('is_admin', false);
        $user->save();
        $user->syncRoles($request->get('roles'));

        event(new UserWasCreated($user));

        flash()->success('User ' . $user->first_name . 'successfully created!');

        return redirect()->route('administrator.users.index');
    }
public function store(StoreUserValidator $request)
    {
        $user               = new User($request->all());
        $user->password     = bcrypt($request->get('password'));
        $user->is_activated = $request->get('is_activated', false);
        $user->is_blocked   = $request->get('is_blocked', false);
        $user->is_admin     = $request->get('is_admin', false);
        $user->save();
        $user->syncRoles($request->get('roles'));

        event(new UserWasCreated($user));

        flash()->success('User ' . $user->first_name . 'successfully created!');

        return redirect()->route('administrator.users.index');
    }
public function store ( StoreUserValidator $ request ) { $ user = new User ( $ request -> all ( ) ) ; $ user -> password = bcrypt ( $ request -> get ( 'password' ) ) ; $ user -> is_activated = $ request -> get ( 'is_activated' , false ) ; $ user -> is_blocked = $ request -> get ( 'is_blocked' , false ) ; $ user -> is_admin = $ request -> get ( 'is_admin' , false ) ; $ user -> save ( ) ; $ user -> syncRoles ( $ request -> get ( 'roles' ) ) ; event ( new UserWasCreated ( $ user ) ) ; flash ( ) -> success ( 'User ' . $ user -> first_name . 'successfully created!' ) ; return redirect ( ) -> route ( 'administrator.users.index' ) ; }
Store a newly created user.

@param \Yajra\CMS\Contracts\Validators\StoreUserValidator $request
@return \Illuminate\Http\RedirectResponse
Store a newly created user .