Hi guys i search in forum but not find a solution for this.
I need calculate age of a person from date field mysql with format xxxx-xx-xx into query builder
i have this code
DB::table('users as U') ->leftJoin('infomodelos as I', 'I.id_fk', '=', 'U.id') ->leftJoin('region as R', 'R.REGION_ID', '=', 'I.region') ->leftJoin('imagenes as IM', 'IM.id_fk', '=', 'U.id') ->where('U.perfil', 1) ->where('U.role_id', 2) ->where('I.sexo', 0) ->where('IM.perfil', 1) ->select('U.id as id', 'U.nombre as nombre', 'U.apellido as apellido', 'I.nacimiento as edad', 'R.REGION_NOMBRE as region', 'I.disponibilidad as disponibilidad', 'IM.nombre as imagen') ->get();
Thanks!!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community