Added the support for generating docs from template doc

This commit is contained in:
Simon Pocrnjič
2025-10-06 21:46:28 +02:00
parent 0c8d1e0b5d
commit cec5796acf
69 changed files with 4570 additions and 374 deletions
@@ -0,0 +1,36 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests\StorePermissionRequest;
use App\Models\Permission;
use Illuminate\Http\RedirectResponse;
use Inertia\Inertia;
use Inertia\Response;
class PermissionController extends Controller
{
public function index(): Response
{
$permissions = Permission::query()
->select('id','name','slug','description','created_at')
->orderBy('name')
->get();
return Inertia::render('Admin/Permissions/Index', [
'permissions' => $permissions,
]);
}
public function create(): Response
{
return Inertia::render('Admin/Permissions/Create');
}
public function store(StorePermissionRequest $request): RedirectResponse
{
Permission::create($request->validated());
return redirect()->route('admin.index')->with('success', 'Dovoljenje ustvarjeno.');
}
}