public function index()
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $locations = Location::with('upcoming_jobs_count')
            ->onTeam()
            ->orderBy('name', 'asc')
            ->paginate(config('app.pagination_default'));
        return fractal($locations, new LocationTransformer())
            ->withResourceName('location')
            ->respond();
    }
public function index()
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $locations = Location::with('upcoming_jobs_count')
            ->onTeam()
            ->orderBy('name', 'asc')
            ->paginate(config('app.pagination_default'));
        return fractal($locations, new LocationTransformer())
            ->withResourceName('location')
            ->respond();
    }
public function index ( ) { /** @noinspection PhpUndefinedMethodInspection */ $ locations = Location :: with ( 'upcoming_jobs_count' ) -> onTeam ( ) -> orderBy ( 'name' , 'asc' ) -> paginate ( config ( 'app.pagination_default' ) ) ; return fractal ( $ locations , new LocationTransformer ( ) ) -> withResourceName ( 'location' ) -> respond ( ) ; }
Fetch a paginated list of Locations for a selected Team

@return \Illuminate\Http\Response JSON array list of Locations, with pagination headers
Fetch a paginated list of Locations for a selected Team