<?php

namespace App\Http\Controllers\API\V1;

use App\Http\Controllers\Controller;
use App\Http\Resources\AdvertisementCollection;
use App\Models\Advertisement;
use App\Traits\HttpResponses;
use Illuminate\Http\Request;

class APIAdvertisementController extends Controller
{
    use HttpResponses;
    public function getAll()
    {
        $advertisements = Advertisement::all();
        return $this->success(
            data: new AdvertisementCollection($advertisements),
            message: 'Advertisements have been responded successfully'
        );
    }
}
