if(!function_exists('route_parameter')){/** * Get a given parameter from the route. * * @param $name * @param null $default * @return mixed */functionroute_parameter($name,$default=null){$routeInfo=app('request')->route();returnarray_get($routeInfo[2],$name,$default);}}