app/Http/Controllers/Site/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(UserRequest $request)
    {
        $record = $request->except('password_confirmation', 'password');
        if ($request->password) {
            $record['password'] = bcrypt($request['password']);
        }
        $user = User::create($record);
        return $this->success($user);
    }
public function store ( UserRequest $ request ) { $ record = $ request -> except ( 'password_confirmation' , 'password' ) ; if ( $ request -> password ) { $ record [ 'password' ] = bcrypt ( $ request [ 'password' ] ) ; } $ user = User :: create ( $ record ) ; return $ this -> success ( $ user ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .