<?php

namespace TPS\API\Http\Controllers;

use TPS\API\Http\Resources\Core\CMSResource;
use Webkul\CMS\Repositories\CmsRepository;
use Webkul\RestApi\Http\Controllers\V1\Shop\ShopController;

class CMS extends ShopController
{
    /**
     * These are ignored during request.
     *
     * @var array
     */
    protected $requestException = ['page', 'limit', 'pagination', 'sort', 'order', 'token','locale','currency'];
    /**
     * Resource class name.
     *
     * @return string
     */
    public function resource()
    {
        return CMSResource::class;
    }

    /**
     * Repository class name.
     *
     * @return string
     */
    public function repository()
    {
        return CmsRepository::class;
    }
    /**
     * Is resource authorized.
     *
     * @return bool
     */
    public function isAuthorized()
    {
        return false;
    }

    public function contacts(){
        return response()->json([
            'phone' =>core()->getConfigData('general.general.info.phone'),
            'address' => core()->getConfigData('general.general.info.address')
        ]);
    }
}