PackageLogisticController.php 616 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\OrderPackage;
  4. use Illuminate\Http\Request;
  5. class PackageLogisticController extends Controller
  6. {
  7. //
  8. /**
  9. * PackageLogisticsController constructor.
  10. */
  11. public function __construct()
  12. {
  13. $this->middleware('auth');
  14. }
  15. public function index()
  16. {
  17. $orderPackages = OrderPackage::query()->with(['order' => function ($query) {
  18. $query->with(['logistic','owner','packages.commodities']);
  19. }])->orderByDesc('id')->paginate(50);
  20. return view('package.logistic.index', compact('orderPackages'));
  21. }
  22. }