コード例 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     // $orders = Order::all();
     // $orders = Order::latest()->get();
     $orders = Order::latest('created_at')->get();
     return view('orders.index', compact('orders'));
 }
コード例 #2
0
 public function test()
 {
     $order = Order::latest()->first();
     Paysera::makePayment(['order_id' => $order->id, 'amount' => $order->amount]);
 }
コード例 #3
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $orders = $this->orders->latest()->paginate(20);
     return $this->jsonRespond->respondPaginator($this->orderTransformer, $orders);
 }