- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
31 lines
711 B
PHP
31 lines
711 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin\Settings;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\SettingService;
|
|
use Illuminate\Http\Request;
|
|
|
|
/**
|
|
* Controller to display the site settings interface.
|
|
*/
|
|
class SettingIndexController extends Controller
|
|
{
|
|
/**
|
|
* Display the site settings index page.
|
|
*
|
|
* @param SettingService $settingService
|
|
* @return \Illuminate\View\View
|
|
*/
|
|
public function __invoke(SettingService $settingService)
|
|
{
|
|
$this->authorize('manage-settings');
|
|
|
|
$settings = $settingService->getAllSettings()->pluck('value', 'key');
|
|
|
|
return view('admin.settings.index', [
|
|
'settings' => $settings
|
|
]);
|
|
}
|
|
}
|