예제 #1
0
 public function bids()
 {
     echo '<pre>';
     echo '<h1>All bids</h1>';
     $arr = Bid::all()->toArray();
     print_r($arr);
     echo '<h1>Completed bids</h1>';
     $bid = Bid::completed()->get()->toArray();
     print_r($bid);
     echo '<h1>Successfully completed bids</h1>';
     $bid = Bid::successful()->get()->toArray();
     print_r($bid);
     echo '<h1>First bid conversation</h1>';
     $bid = Bid::first()->conversation->toArray();
     print_r($bid);
 }
예제 #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $bids = Bid::all();
     return response()->json($bids);
 }