| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace App\Http\Controllers;
- use App\Filters\OrderPackageFilters;
- use App\Logistic;
- use App\OrderPackage;
- use App\Owner;
- use Illuminate\Http\Request;
- class PackageLogisticController extends Controller
- {
- //
- /**
- * PackageLogisticsController constructor.
- */
- public function __construct()
- {
- $this->middleware('auth');
- }
- public function index(OrderPackageFilters $filters)
- {
- $orderPackages = OrderPackage::query()->filter($filters)->with(['order' => function ($query) {
- $query->with(['logistic', 'owner', 'packages.commodities']);
- }])->orderByDesc('id')->paginate(50);
- // $orderPackages = OrderPackage::query()->with(['order' => function ($query) {
- // $query->with(['logistic','owner','packages.commodities']);
- // }]) ->orderByDesc('id')->paginate(50);
- $logistics = Logistic::all();
- $owners = Owner::all();
- return view('package.logistic.index', compact('orderPackages', 'logistics', 'owners'));
- }
- }
|