Tenant management
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Admin\Controllers;
|
||||
|
||||
use App\Models\Tenant;
|
||||
use App\Providers\InertiaProvider;
|
||||
use App\Scopes\CommonController;
|
||||
use Illuminate\Http\Request;
|
||||
use Inertia\Response;
|
||||
|
||||
class TenantEditPageController extends CommonController
|
||||
{
|
||||
public function __invoke(string $slug, Request $request): Response
|
||||
{
|
||||
$tenant = Tenant::where('slug', $slug)->firstOrFail();
|
||||
|
||||
$inertiaProvider = new InertiaProvider('Admin/TenantEdit', [
|
||||
'tenant' => [
|
||||
'name' => $tenant->name,
|
||||
'slug' => $tenant->slug,
|
||||
'url' => $tenant->url,
|
||||
'is_active_local_group' => $tenant->is_active_local_group,
|
||||
],
|
||||
]);
|
||||
return $inertiaProvider->render();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user