Change all url to route
This commit is contained in:
@ -1,5 +1,14 @@
|
||||
@php
|
||||
$page = explode('/', $url)[1];
|
||||
if (\Str::contains($url, ['.'])) {
|
||||
$page = explode('.', $url)[0];
|
||||
|
||||
$url = route($url, $item->$id);
|
||||
} else {
|
||||
$page = explode('/', $url)[1];
|
||||
|
||||
$url = url($url, $item->$id);
|
||||
}
|
||||
|
||||
$text = $text ? $text : $page;
|
||||
@endphp
|
||||
|
||||
@ -7,7 +16,7 @@
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'@click' => 'confirmDelete("' . url($url, $item->$id) . '", "' . trans_choice('general.' . $text, 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $item->$value . '</strong>', 'type' => mb_strtolower(trans_choice('general.' . $text, 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
'@click' => 'confirmDelete("' . $url . '", "' . trans_choice('general.' . $text, 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $item->$value . '</strong>', 'type' => mb_strtolower(trans_choice('general.' . $text, 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
|
||||
@push('content_content_end')
|
||||
|
@ -1,10 +1,12 @@
|
||||
@php
|
||||
if (\Str::contains($url, ['.'])) {
|
||||
$url = route($url, $item->$id);
|
||||
$page = explode('.', $url)[0];
|
||||
|
||||
$url = route($url, $item->$id);
|
||||
} else {
|
||||
$url = url($url, $item->$id);
|
||||
$page = explode('/', $url)[1];
|
||||
|
||||
$url = url($url, $item->$id);
|
||||
}
|
||||
|
||||
$text = $text ? $text : $page;
|
||||
|
@ -1,7 +1,14 @@
|
||||
@stack('save_buttons_start')
|
||||
@php
|
||||
if (\Str::contains($cancel, ['.'])) {
|
||||
$url = route($cancel);
|
||||
} else {
|
||||
$url = url($cancel);
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="{{ $col }}">
|
||||
<a href="{{ url($cancel) }}" class="btn btn-icon btn-outline-secondary header-button-top">
|
||||
<a href="{{ $url }}" class="btn btn-icon btn-outline-secondary header-button-top">
|
||||
<span class="btn-inner--icon"><i class="fas fa-times"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('general.cancel') }}</span>
|
||||
</a>
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
<div class="list-group list-group-flush">
|
||||
@if (count($bills))
|
||||
<a href="{{ url('auth/users/' . $user->id . '/read-bills') }}" class="list-group-item list-group-item-action">
|
||||
<a href="{{ route('users.read.bills', $user->id) }}" class="list-group-item list-group-item-action">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-shopping-cart"></i>
|
||||
@ -44,7 +44,7 @@
|
||||
@endif
|
||||
|
||||
@if (count($invoices))
|
||||
<a href="{{ url('auth/users/' . $user->id . '/read-invoices') }}" class="list-group-item list-group-item-action">
|
||||
<a href="{{ rotue('users.read.invoices', $user->id) }}" class="list-group-item list-group-item-action">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<i class="fa fa-money-bill"></i>
|
||||
@ -105,7 +105,7 @@
|
||||
<div class="dropdown-header noti-title">
|
||||
<h6 class="text-overflow m-0">{{ trans('general.welcome') }}</h6>
|
||||
</div>
|
||||
<a href="{{ url('portal/profile/edit') }}" class="dropdown-item">
|
||||
<a href="{{ route('portal.profile.edit') }}" class="dropdown-item">
|
||||
<i class="fas fa-user"></i>
|
||||
<span>{{ trans('auth.profile') }}</span>
|
||||
</a>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div class="card-header">
|
||||
{!! Form::open([
|
||||
'url' => 'common/reports/' . $class->model->id,
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
'route' => 'reports.show', $class->model->id,
|
||||
'role' => 'form',
|
||||
]) !!}
|
||||
|
||||
<div id="items" class="float-left">
|
||||
|
Reference in New Issue
Block a user