Laravel this is not only a practical framework, it is also a programming style
Corral model:
public function sheeps() { return $this->hasMany('App\Sheep'); }
I want to order by number of sheep in each corral and get corral with fewest sheep number:
$corral = Corral::orderBy(..., 'ASC')->first();
Aucun commentaire:
Enregistrer un commentaire