<?php

namespace Bongo\Builder\Http\Controllers\Api;

use Bongo\Builder\Facades\ComponentFacade;
use Bongo\Framework\Http\Controllers\AbstractApiController;

class ComponentController extends AbstractApiController
{
    public function index()
    {
        if (config('settings.memory_limit') && ! empty(config('settings.memory_limit'))) {
            ini_set('memory_limit', config('settings.memory_limit'));
        }

        return ComponentFacade::allAsJson();
    }
}
