mercredi 29 mai 2019

Laravel scope not responding

I am using laravel for my backend api. My question is about an scopefilter, the problem is that it is not responding when I call to it.

I have a lot of examples for using scopefilters. So I looked at each of them to see if I did something wrong. But I can't seem to find the problem.

When I call to this model in laravel, I use a parameter to define too the scopefilter to use a specific function. The point only is that it never gets to this function, I don't get a response when I have put a log in this function.

I assume it is a syntax problem but maybe someone else can find the problem for this.

    public static $scopeFilters = [
        "supplierArticleClientId" => "bySupplierArticleClientId"
    ];

    public function scopeBySupplierArticleClientId($query, $clientId) {
        \Log::info([$clientId]);
    }



In this case I expect that I see an clientId in my log.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire