app/Http/Controllers/AnimalController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $animals = Animal::all();
        return view('animal.index')->with('animals', $animals);
    }
public function index ( Request $ request ) { $ animals = Animal :: all ( ) ; return view ( 'animal.index' ) -> with ( 'animals' , $ animals ) ; }
Display a listing of the resource.
Display a listing of the resource .
// get all the animals // $search = Animal::where([ //     ['chip', '!=', NULL]. //     [function($query) use ($request) { //         if (($chip = $request->chip)) { //             $query->orWhere('chip', 'LIKE', '%' . $chip . '%')->get(); //         } //     }] // ]) //     ->orderBy("id", "desc"); // load the view and pass the animals