为什么我的按上面做直接报 Call to undefined function route_class ()?
Call to undefined function route_class().按代码来的怎么会报这个错呢,helper.php里也有这个函数
<body>
<div id="app" class="{{ route_class() }}-page">
@include('layouts._header')
<div class="container">
<?php
//helpers.php
require_once __DIR__ . '/helpers.php';
function route_class(){
return str_replace('.','-',Route::currentRouteName());
}
@abing