jeudi 3 février 2022

Optimise laravel 5.2 eloquent query that returns a single row

I'm wondering is there any way to optimise this code:

foo::where('bar_id', $this->bar->id)->first()

Is it possible to optimise this and speed up execution without removing any column fields? As I see that is one of the most suggested answers.

What would be your suggestions?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire