How do I query a table such that it only fetches records that matches a particular month and year e.g. Y-m i.e. 2020-10. of the 'created_at' column.
This is what I am currently doing:
School::where('user_id', 1)->where('created_at', '=', '2020-10')->count();
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3aJoqbk
via IFTTT
Aucun commentaire:
Enregistrer un commentaire