Modules/Users/Http/Controllers/UserController.php
/**
     * Store a newly created resource in storage.
     * @param Request $request
     * @return Renderable
     */
Store a newly created resource in storage.
@param Request $request
@return Renderable
Store a newly created resource in storage . @param Request $request @return Renderable
public function store(Request $request)
    {
        $statusCode = 201;
        $user = $this->userService->create($request->all());
        if (!empty($user->code)) {
            $statusCode = $user->code;
        }
        return $user->response()->setStatusCode($statusCode);
    }
public function store ( Request $ request ) { $ statusCode = 201 ; $ user = $ this -> userService -> create ( $ request -> all ( ) ) ; if ( ! empty ( $ user -> code ) ) { $ statusCode = $ user -> code ; } return $ user -> response ( ) -> setStatusCode ( $ statusCode ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .