src/Http/Controllers/Admin/InvoicesController.php
public function issue($id, Request $request)
    {
        $resource = $this->getManager()->getRepository()->findOneById($id);

        if (!$resource) {
            return $this->not_found();
        }

        $result = $this->getManager()->issue($resource);

        if ($result->ok()) {
            return $this->success([
                'data' => $this->getManager()->getSerializer()->serialize($result->getResource(), collect($this->queryable))->all(),
            ]);
        }

        return $this->error([
            'errors' => $result->getSimpleErrors(),
        ]);
    }
public function issue($id, Request $request)
    {
        $resource = $this->getManager()->getRepository()->findOneById($id);

        if (!$resource) {
            return $this->not_found();
        }

        $result = $this->getManager()->issue($resource);

        if ($result->ok()) {
            return $this->success([
                'data' => $this->getManager()->getSerializer()->serialize($result->getResource(), collect($this->queryable))->all(),
            ]);
        }

        return $this->error([
            'errors' => $result->getSimpleErrors(),
        ]);
    }
public function issue ( $ id , Request $ request ) { $ resource = $ this -> getManager ( ) -> getRepository ( ) -> findOneById ( $ id ) ; if ( ! $ resource ) { return $ this -> not_found ( ) ; } $ result = $ this -> getManager ( ) -> issue ( $ resource ) ; if ( $ result -> ok ( ) ) { return $ this -> success ( [ 'data' => $ this -> getManager ( ) -> getSerializer ( ) -> serialize ( $ result -> getResource ( ) , collect ( $ this -> queryable ) ) -> all ( ) , ] ) ; } return $ this -> error ( [ 'errors' => $ result -> getSimpleErrors ( ) , ] ) ; }
Issue a resource.

@param mixed                    $id
@param \Illuminate\Http\Request $request

@return \Illuminate\Http\Response
Issue a resource .