mercredi 4 novembre 2015

Eloquent ORM select all with limit and column name

Hi how can I select limited number of all the item from model and the selection with certain names.

eg:

$product = Product::all()->limit(4)->select('id','name');

Most of example start with Product::find(1) but my case, I don't have id. Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire