mardi 16 février 2021

Laravel: placing semicolon in query?

I am new to writing queries in Laravel and wondering what the convention for semi-colons are. Is it proper to leave them out until the last query like I have omitted them from the 2 $query down below or should they be after each one?:

NewProducts::with(['order', 'product', 'other.product'])
    ->whereHas(
        'saleItem',
        function ($query) use ($time) {
            $query->where('time', '=', $time)
            $query->where('value', '=', 'high')
        }
    )->get();


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire