ro
eda377aba3
with the setting page set up, now the the settings api can be added, beginning with the ability to render all files from settings. the base settings api class is set up, so now the rest of the methods can be added
28 lines
718 B
PHP
28 lines
718 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use App\Services\SettingsService;
|
|
use App\Services\RenderService;
|
|
|
|
class SettingsAPIController extends Controller
|
|
{
|
|
protected $settings;
|
|
protected $render;
|
|
|
|
public function __construct(SettingsService $settingsService, RenderService $renderService)
|
|
{
|
|
$this->settings = $settingsService;
|
|
$this->render = $renderService;
|
|
}
|
|
|
|
public function publish(Request $request)
|
|
{
|
|
$body = json_decode($request->getContent());
|
|
$result = $this->render->publishAll();
|
|
return response()->json($result)->header('Content-Type', 'application/json');
|
|
}
|
|
}
|