<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Resources\PagesCollection;
use App\Http\Resources\PagesResource;
use App\Models\Pages;
use Illuminate\Http\Request;

class PagesController extends Controller
{
    public function index(){
  
        $data =   Pages::all();

        PagesResource::usingWithCollection();

        return new PagesCollection($data);
    }
}
