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);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire