Ejemplo n.º 1
0
 public function indexPetsByClient($id)
 {
     $client = Client::find($id);
     $pets = Pet::where('client_id', '=', $id)->paginate(10);
     return view('pet.index', compact('client', 'pets'));
 }
Ejemplo n.º 2
0
 public static function getPetByClientId($id)
 {
     return Pet::where('client_id', '=', $id)->get();
 }