/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { session_start(); if (isset($_SESSION['contact_report_to'])) { $contact_details = App\contact::where('deleted', '0')->where('id', $_SESSION['contact_report_to'])->first(); return View::make('ticket.ticket_create', compact('contact_details')); } else { return View::make('ticket.ticket_create'); } }
public function checkcall($cli) { $contact = App\contact::where('deleted', '0')->where('contact_no', $cli)->first(); if ($contact) { return 1; } else { $count = App\contact::where('deleted', '0')->where('contact_mobile2', $cli)->orwhere('contact_work_phone', $cli)->count(); if ($count == 0) { return 0; } elseif ($count == 1) { return 1; } elseif ($count > 1) { return 3; } } }