@php
$urlSegments = explode('/', url()->previous());
$type = end($urlSegments);
$type = isset($urlSegments[count($urlSegments) - 2]) ? $urlSegments[count($urlSegments) - 2] : null;
if ($type == 'type') {
$val = end($urlSegments);
}
@endphp
@section('scripts')
@endsection