/** * Display a listing of the resource. * * @param ReportingRepo $reporting * @return Response */ public function dashboard(ReportingRepo $reporting) { $lead_sources = $reporting->leads_by_source(); $leads = Lead::where('is_scrubbed', 0)->paginate(10); $pending_leads = PendingLead::orderBy('est_closing_date', 'ASC')->get(); return view('admin.leadrouter.dashboard', compact('leads', 'pending_leads', 'lead_sources')); }
/** * Mencari Lead yang dimiliki oleh Play pada wilayah kerja * tertentu. * * @param int $playId Play ID * @param string $workingAreaIid * @param boolean $withDeleted Termasuk Lead yang sudah dihapus * @return \Illuminate\Support\Collection */ public function findLead($playId, $workingAreaId, $withDeleted = false) { $data = Lead::where(['play_id' => $playId, 'working_area_id' => $workingAreaId]); if ($withDeleted) { $data->withTrashed(); } return $data->get(); }
/** * Handle the event. * * @param AttributionSubmitted $event * @return Boolean */ public function handle(AttributionSubmitted $event) { $lead = Lead::where('landing_page_id', $event->attribution->landing_page_id)->where('email', $event->attribution->email)->where('has_attribution', 0)->orderBy('created_at', 'DESC')->first(); // If attribution entry is found already, set the lead id if (!is_null($lead)) { $event->attribution->lead_id = $lead->id; $lead->has_attribution = true; $event->attribution->save(); $lead->save(); } return true; }
public function getUrllinks($urlId) { $leads = Lead::where('url_id', '=', $urlId)->get(); return view('app.ajax-link-list', compact('leads')); }
public function getMyLeads($user_id) { $leads = $this->lead->where('user_id', $user_id)->orderBy('updated_at')->all(); return $leads; }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $leads = Lead::where('active', 0)->where('disposition_id', '=', 3)->orderBy('updated_at')->get(); return view('callback.index', compact('leads')); }
public function postAdd() { if (!Auth::check()) { return Redirect::to('leads/login'); } $Lead = Lead::where('Country', '=', Input::get('country'))->where('user_id', '=', 0)->take(Input::get('count')); $Lead->update(['user_id' => Input::get('user_id')]); return Redirect::to('leads/employees'); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { Lead::where('id', '=', $id)->update(['first_name' => $request->get('first_name'), 'last_name' => $request->get('last_name'), 'job_title' => $request->get('job_title'), 'company_name' => $request->get('company_name'), 'email' => $request->get('email'), 'phone' => $request->get('phone'), 'market_segments' => $request->get('market_segments'), 'newsletter' => $request->get('newsletter'), 'interested_product' => $request->get('interested_product'), 'interested_demo' => $request->get('interested_demo'), 'notes' => $request->get('notes')]); return redirect('leadForms'); }
public static function UpdateLeadInformation($request) { Lead::where('id', $request->get('lead_id'))->update(['city' => $request->get('city'), 'state' => $request->get('state'), 'date_of_birth' => date('Y-m-d', strtotime($request->get('date_of_birth'))), 'zip' => $request->get('zip')]); return Redirect::back()->with('message', 'Lead has been updated'); }
protected function modifyDbHomeFinder() { $leads = Lead::where('source_name', 'like', '%Homefinder.com%')->get(); foreach ($leads as $lead) { $lead->source_name = 'Homefinder.com'; $lead->save(); } }
public function all($communityId) { $leads = \App\Lead::where('community_id', '=', $communityId)->get(); return json_encode($leads); }