app/Http/Controllers/PokedexController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
     */
Display a listing of the resource.
Display a listing of the resource .
public function index()
    {
        $response = Http::get('https://pokeapi.co/api/v2/pokedex/1');
        return PokemonResource::collection($response->collect()->get('pokemon_entries'));
    }
public function index ( ) { $ response = Http :: get ( 'https://pokeapi.co/api/v2/pokedex/1' ) ; return PokemonResource :: collection ( $ response -> collect ( ) -> get ( 'pokemon_entries' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .