/** * O método precisa informar uma lista de produtos * @return {view} */ public function create() { $stocks = Stock::all(); $customers = Customer::all(); $employees = Employee::all(); return view('pages.new_sale', ['stocks' => $stocks, 'customers' => $customers, 'employees' => $employees]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { //Cache::pull('customer'); $customers = Cache::get('customer', function () { $customer = Customer::all(); Cache::forever('customer', $customer); return $customer; }); // print_r($customers); // die; return view('customer.main', ['theme' => 'default', 'customer' => $customers]); }
public function save(Request $request) { $customer = Customer::create($request->all()); $customers = Customer::all(); return view('pages.customers', ['customers' => $customers]); }
public function showAll() { $customers = Customer::all(); return view('customer_all', ['customers' => $customers->getArray()]); }
/** * Static function that returns the list of ids and designs grouped by customer * @return mixed */ public static function listIDAndDesignGroupedByCustomer() { foreach (Customer::all() as $customer) { if (isset($customer->jobCostings) && $customer->jobCostings->count() > 0) { $list[$customer->customer_company_name] = $customer->jobCostings->pluck('jc_design_name', 'job_costing_id'); } } $list = collect($list); return $list; }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return Customer::all(); }
/** * Return a view with all the MOQ and relevant JobCosting * * @return $this */ public function create() { $this->authorize('edit_job_costings'); return view('jobcostings.create')->with(['jobcosting' => new JobCosting(), 'customers' => Customer::all()->sortBy('customer_company_name')]); }
/** * Display a listing of the resource. * @return Response */ public function index() { $customers = Customer::all(); return view('customers.index', compact('customers')); }