mercredi 24 octobre 2018

Laravel Eloquent query building for serching by year of a date

I am a beginner at laravel and I am working in implementing a search.

there is a row of date and I need to search by year, I read and tried a couple of solutions but I could not find a good solution.

this is the query i found in internet as a potential solution but this is not working:

$Data = DB::table('actuals')->where('company_id',$companyId)->whereYear('date', '=', $SearchInput)->orderBy('date', 'asc')->get();



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire