Пример #1
0
Route::get('f**k', function () {
    return (new ProductionItem())->getUnsoldItems();
    return Carbon::now()->addDays(2);
    return $item = ProductionItem::where('production_id', '=', '215')->where('item_id', '=', '10037')->where('status', '=', "pending")->first()->id;
    return ReportsController::generateSalesByRange();
    return View::make('hello');
    return Auth::user()->username;
    return PDF::loadView('items.barcodes')->setPaper('a6')->setOrientation('landscape')->setWarnings(false)->stream('barcodes.pdf');
});
Route::get('tt', function () {
    return Session::get('REGISTER');
    $item = Item::all();
    return PDF::loadView('items.barcodes')->setPaper('a6')->setOrientation('landscape')->setWarnings(false)->stream('barcodes.pdf');
    $prod = new ProductionItem();
    $pending = $prod->getPendingItems();
    $prod_items = $prod->getCurrentProductionsItemId();
    // return $pending[0]->remaining;
    foreach ($pending as $item) {
        print $item->item_id . " ";
        if (in_array($item->item_id, $prod_items)) {
            return "pending";
            exit;
        }
        return "not pending";
        exit;
    }
    $invoiceInfo = ['customer' => 'Raymund Santillan', 'total' => 'Php 150.00'];
    PDF::loadView('registrar.invoice', $invoiceInfo)->setPaper('a6')->setOrientation('landscape')->setWarnings(false)->stream('myfile.pdf');
    $invoiceInfo = ['customer' => 'Raymund Santillan', 'total' => 'Php 150.00'];
    $invoice = PDF::loadView('registrar.invoice', $invoiceInfo);
    return $invoice->download();