コード例 #1
0
 /**
  * Display the specified resource.
  *
  * @param  int  
  * @return \Illuminate\Http\Response
  */
 public function show()
 {
     $user = User::all();
     $dog = Dog::all();
     //$dog = Dog::find(3);
     return view('users', ['users' => $user, 'dogs' => $dog]);
 }
コード例 #2
0
 /**
  * Show all dogs
  *
  * Get a JSON representation of all the dogs
  * 
  * @Get('/')
  */
 public function index()
 {
     return $this->collection(Dog::all(), new DogTransformer());
 }