src/Http/Controllers/UserController.php
public function create(StoreUserRequest $request)
    {
        $data = $request->all();

        /** @var \Unite\UnisysApi\Models\User $object */
        $object = $this->repository->create($data);
        $object->roles()->sync( $request->get('roles_id') ?: [] );

        \Cache::tags('response')->flush();

        return $this->response->resource($object);
    }
public function create(StoreUserRequest $request)
    {
        $data = $request->all();

        /** @var \Unite\UnisysApi\Models\User $object */
        $object = $this->repository->create($data);
        $object->roles()->sync( $request->get('roles_id') ?: [] );

        \Cache::tags('response')->flush();

        return $this->response->resource($object);
    }
Create

@param StoreUserRequest $request

@return Resource|UserResource