@php $route = request() ->route() ->getName(); $routeX = explode('.', $route); $action = $routeX[1] ?? ''; @endphp