how to use like operator with '%'-Wildcard in where function of Collection in Laravel 5.3
Hi,
I want to make a query like "SELECT * FROM bookings' WHERE bill_of_delivery LIKE '123%'; " using Eloquent.
I try to implememt it using the code below.
thanks for helping but
the problem is that this field isn't in the used table. This field is in a joined table. I access this field via the model using follwing.
public function getBillOfDeliveryAttribute(){
return $this->booking->bill_of_delivery;
}
When I use BookingOverview::where I got an error that 'bill_of_delivery' is missing in my table.