jeudi 30 juin 2016

Query random with Laravel and exclude a specific row

How can I create a query random with laravel and exclude a specific row

I tried this :

return $this->user
            ->get()
            ->random(1)
            ->where('id', '!=', 1);



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/295NkBg
via IFTTT

Aucun commentaire:

Enregistrer un commentaire