when i use Laravel DB as an alternate to Eloquent. The data get by the DB class is not looping i have try to convert it in to an array but all my effort is not showing.I will appreciate if i can solve this issue as soon as possible.
$result = DB::table('assets')
->join('locations', 'location_id', '=', 'locations.id')
->where('name', 'LIKE', '%' . $query . '%')
->orWhere('state', 'LIKE', '%' . $state . '%')
->orWhere('country', 'LIKE', '%' . $state . '%')
->orWhere('city', 'LIKE', '%' . $city . '%')
->select('assets.*', 'locations.*')
->get();
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire