init with kirby, vue and pagedjs interactive
This commit is contained in:
commit
dc0ae26464
968 changed files with 211706 additions and 0 deletions
27
public/kirby/config/api/routes/roles.php
Normal file
27
public/kirby/config/api/routes/roles.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Roles Routes
|
||||
*/
|
||||
return [
|
||||
[
|
||||
'pattern' => 'roles',
|
||||
'method' => 'GET',
|
||||
'action' => function () {
|
||||
$kirby = $this->kirby();
|
||||
|
||||
return match ($kirby->request()->get('canBe')) {
|
||||
'changed' => $kirby->roles()->canBeChanged(),
|
||||
'created' => $kirby->roles()->canBeCreated(),
|
||||
default => $kirby->roles()
|
||||
};
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'roles/(:any)',
|
||||
'method' => 'GET',
|
||||
'action' => function (string $name) {
|
||||
return $this->kirby()->roles()->find($name);
|
||||
}
|
||||
]
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue