2024-08-01 11:17:49 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Setting\Actions;
|
|
|
|
|
2024-08-01 11:32:14 +02:00
|
|
|
use App\Setting\LocalSettings;
|
2024-08-01 12:19:28 +02:00
|
|
|
use App\Setting\SettingFactory;
|
2024-08-01 11:17:49 +02:00
|
|
|
use Inertia\Inertia;
|
|
|
|
use Inertia\Response;
|
|
|
|
use Lorisleiva\Actions\Concerns\AsAction;
|
|
|
|
|
2024-10-14 20:25:11 +02:00
|
|
|
/** @deprecated */
|
2024-08-01 11:17:49 +02:00
|
|
|
class ViewAction
|
|
|
|
{
|
|
|
|
use AsAction;
|
|
|
|
|
2024-08-01 11:32:14 +02:00
|
|
|
public function handle(LocalSettings $settingGroup): Response
|
2024-08-01 11:17:49 +02:00
|
|
|
{
|
|
|
|
session()->put('menu', 'setting');
|
|
|
|
session()->put('title', $settingGroup::title());
|
|
|
|
|
2024-08-01 12:19:28 +02:00
|
|
|
return Inertia::render('setting/' . ucfirst($settingGroup::group()), [
|
|
|
|
...$settingGroup->viewData(),
|
|
|
|
'setting_menu' => app(SettingFactory::class)->getShare(),
|
|
|
|
]);
|
2024-08-01 11:17:49 +02:00
|
|
|
}
|
|
|
|
}
|