app/Http/Controllers/PlayerController.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()
    {
        $players = Player::all();
        return PlayerResource::collection($players);
    }
public function index ( ) { $ players = Player :: all ( ) ; return PlayerResource :: collection ( $ players ) ; }
Display a listing of the resource.
Display a listing of the resource .
// get articles //return collection of players as a resource