Skip to content

Commit

Permalink
refactor: prefix all routes
Browse files Browse the repository at this point in the history
  • Loading branch information
warlof committed Feb 20, 2023
1 parent fc81d08 commit cfd99ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Config/package.sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
'name' => 'SeAT API',
'icon' => 'fas fa-exchange-alt',
'route_segment' => 'api-admin',
'route' => 'api-admin.list',
'route' => 'seatcore::api-admin.list',
],
];
8 changes: 4 additions & 4 deletions src/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
'prefix' => 'api-admin',
], function () {
Route::get('/')
->name('api-admin.list')
->name('seatcore::api-admin.list')
->uses('ApiAdminController@listTokens');

Route::post('/')
->name('api-admin.token.create')
->name('seatcore::api-admin.token.create')
->uses('ApiAdminController@generateToken');
Route::get('/logs/{token_id}')
->name('api-admin.token.logs')
->name('seatcore::api-admin.token.logs')
->uses('ApiAdminController@show');
Route::get('/delete/{token_id}')
->name('api-admin.token.delete')
->name('seatcore::api-admin.token.delete')
->uses('ApiAdminController@deleteToken');
});
});
Expand Down
10 changes: 5 additions & 5 deletions src/resources/views/list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</h3>
<div class="card-tools">
<span class="float-right">
<a href="{{ route('l5-swagger.api') }}" target="_blank" class="btn btn-success btn-xs">
<a href="{{ route('l5-swagger.default.api') }}" target="_blank" class="btn btn-success btn-xs">
<i class="fas fa-book"></i>
{{ trans('api::seat.api_docs') }}
</a>
Expand All @@ -21,7 +21,7 @@
</div>
<div class="card-body">

<form role="form" action="{{ route('api-admin.token.create') }}" method="post" id="key-form">
<form role="form" action="{{ route('seatcore::api-admin.token.create') }}" method="post" id="key-form">
{{ csrf_field() }}

<div class="box-body">
Expand Down Expand Up @@ -93,12 +93,12 @@
<td>{{ $token->allowed_src }}</td>
<td>
<div class="btn-group">
<a href="{{ route('api-admin.token.delete', [$token->id]) }}" type="button"
<a href="{{ route('seatcore::api-admin.token.delete', [$token->id]) }}" type="button"
class="btn btn-danger btn-xs confirmlink col-xs-6">
<i class="fas fa-trash-alt"></i>
{{ trans('api::seat.delete') }}
</a>
<a href="{{ route('api-admin.token.logs', [$token->id]) }}" type="button"
<a href="{{ route('seatcore::api-admin.token.logs', [$token->id]) }}" type="button"
class="btn btn-primary btn-xs col-xs-6">
<i class="fas fa-clipboard-list"></i>
{{ trans('api::seat.logs') }}
Expand All @@ -116,7 +116,7 @@ class="btn btn-primary btn-xs col-xs-6">
<div class="card-footer">
{{ count($tokens) }} {{ trans_choice('api::seat.token', count($tokens)) }}
<span class="float-right">
API Documentation can be found <a href="{{ route('l5-swagger.api') }}">here</a>.
API Documentation can be found <a href="{{ route('l5-swagger.default.api') }}">here</a>.
</span>
</div>
</div>
Expand Down

0 comments on commit cfd99ea

Please sign in to comment.