86 lines
3.5 KiB
PHP
86 lines
3.5 KiB
PHP
@extends('admin.layouts.app')
|
|
|
|
@section('title', 'Route List')
|
|
|
|
@push('admin-app-scripts')
|
|
<script src="{{ asset('js/admin/page/system-status.js') }}"></script>
|
|
@endpush
|
|
|
|
@push('admin-app-styles')
|
|
<link href="{{ asset('css/admin/page/system-status.css') }}" rel="stylesheet">
|
|
@endpush
|
|
|
|
@section('admin-page-content')
|
|
<div class="row">
|
|
<div class="col">
|
|
<h1>Route List</h1>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
<table class="table table-sm table-dark table-striped table-hover routes">
|
|
<thead>
|
|
<tr>
|
|
<th class="method desktop tablet-l tablet-p mobile-l mobile-p" data-priority="1">Method</th>
|
|
<th class="uri desktop tablet-l tablet-p mobile-l mobile-p" data-priority="1">URI</th>
|
|
<th class="name desktop tablet-l tablet-p" data-priority="3">Name</th>
|
|
<th class="action desktop tablet-l" data-priority="4">Action</th>
|
|
<th class="middleware desktop" data-priority="5">Middleware</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($routes as $route)
|
|
<tr>
|
|
<td class="method">
|
|
{!!
|
|
collect($route['methods'])
|
|
->map(function($method){
|
|
$badgeType = '';
|
|
switch(strtolower($method)) {
|
|
case 'get':
|
|
$badgeType = 'success';
|
|
break;
|
|
case 'post':
|
|
$badgeType = 'primary';
|
|
break;
|
|
case 'put':
|
|
case 'patch':
|
|
$badgeType = 'warning';
|
|
break;
|
|
case 'delete':
|
|
$badgeType = 'danger';
|
|
break;
|
|
}
|
|
return app('Html')->bs()->badge($method, $badgeType);
|
|
})
|
|
->join('<br>')
|
|
!!}
|
|
</td>
|
|
<td class="uri">
|
|
@if(in_array('GET', $route['methods']))
|
|
<a href="/{{ ltrim( $route['uri'], '/') }}" class="font-weight-bold text-break" target="_blank">{{ $route['uri'] }}</a>
|
|
@else
|
|
<span class="font-weight-bold text-break">{{ $route['uri'] }}</span>
|
|
@endif
|
|
</td>
|
|
<td class="name">{{ $route['name'] }}</td>
|
|
<td class="action">
|
|
<span class="controller text-break">{{ $route['action']['controller'] }}</span>@<span class="method text-info text-break">{{ $route['action']['method'] }}</span>
|
|
</td>
|
|
<td class="middleware">
|
|
{!!
|
|
collect($route['middlewares'])
|
|
->map(function($name){
|
|
return app('Html')->bs()->badge($name, 'secondary');
|
|
})
|
|
->join('')
|
|
!!}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|