Route::currentRouteNamed PHP Method

currentRouteNamed() public static method

Determine if the current route matches a given name.
public static currentRouteNamed ( string $name ) : boolean
$name string
return boolean
        public static function currentRouteNamed($name)
        {
            return \Illuminate\Routing\Router::currentRouteNamed($name);
        }

Usage Example

コード例 #1
0
ファイル: Helper.php プロジェクト: alfrcr/ilearn
function is_detailpage()
{
    $routes = ['classrooms.discussiondetail', 'classrooms.assignmentdetail', 'classrooms.coursedetail', 'classrooms.moduledetail', 'classrooms.quizdetail'];
    foreach ($routes as $route) {
        if (Route::currentRouteNamed($route)) {
            return true;
        }
    }
    return false;
}
All Usage Examples Of Route::currentRouteNamed