Mails
This commit is contained in:
parent
68b9d1ff88
commit
b9c26d06d0
75 changed files with 2143 additions and 818 deletions
|
|
@ -79,16 +79,17 @@ class RequestController extends Controller
|
|||
*/
|
||||
private function getSearchRequests(){
|
||||
|
||||
$query = Booking::with('lead')->with('customer_mails')->where('lead_id', '!=', NULL);
|
||||
$query = Booking::with('lead')->with('customer')->with('customer_mails')->select('booking.*')->where('lead_id', '!=', NULL);
|
||||
|
||||
if(Request::get('full_firstname_search') != ""){
|
||||
$query->where('participant_firstname', 'LIKE', '%'.Request::get('full_firstname_search').'%');
|
||||
}
|
||||
|
||||
$query->whereHas('customer', function ($q) {
|
||||
$q->where('firstname', 'LIKE', '%'.Request::get('full_firstname_search').'%');
|
||||
}); }
|
||||
if(Request::get('full_lastname_search') != ""){
|
||||
$query->where('participant_name', 'LIKE', '%'.Request::get('full_lastname_search').'%');
|
||||
$query->whereHas('customer', function ($q) {
|
||||
$q->where('name', 'LIKE', '%'.Request::get('full_lastname_search').'%');
|
||||
});
|
||||
}
|
||||
|
||||
if(Request::get('travel_option_country_id') != ""){
|
||||
$country_ids = TravelCountry::where('contact_lands', 'LIKE', '%"'.Request::get('travel_option_country_id').'"%')->get()->pluck('id');
|
||||
$country_ids[] = Request::get('travel_option_country_id');
|
||||
|
|
@ -261,12 +262,12 @@ class RequestController extends Controller
|
|||
->addColumn('lead_id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->lead_id.'" href="'.make_old_url('leads/'.$booking->lead_id.'/edit').'" data-id="'.$booking->lead_id.'">'.$booking->lead_id.'</a>';
|
||||
})
|
||||
->addColumn('participant_firstname', function (Booking $booking) {
|
||||
/*->addColumn('participant_firstname', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_firstname.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_firstname.'</a>';
|
||||
})
|
||||
->addColumn('participant_name', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_name.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_name.'</a>';
|
||||
})
|
||||
})*/
|
||||
->addColumn('id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->id.'" href="'.make_old_url('booking/'.$booking->id.'/edit').'" data-id="'.$booking->id.'">'.$booking->id.'</a>';
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue