forked from projects/fipamo
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');
|
||
|
}
|
||
|
}
|