@php use Illuminate\Support\Facades\Route; $params = Request::all(); $current_route = Route::currentRouteName(); $hide_last_part = false ; try { $temp_array = explode(".",$current_route); $temp = end($temp_array) ; if($temp=="edit") $hide_last_part =true ; }catch (Exception $exception){ } //$current_route = Route::currentRouteName(); @endphp