-
app/Http/Controllers/LeadsController.php
Open in GitHubclass LeadsController extends Controller { // public function show($external_id) { $lead = $this->findByExternalId($external_id); $offers = $lead->offers->map(function($offer) { return new InvoiceCalculator($offer); }); return view('leads.show') ->withLead($lead) ->withOffers($offers) ->withUsers(User::with(['department'])->get()->pluck('nameAndDepartmentEagerLoading', 'id')) ->withCompanyname(Setting::first()->company) ->withStatuses(Status::typeOfLead()->pluck('title', 'id')); } // }