public function mapFrontendRoutes()
    {
        $directory = base_path('routes');
        if(is_dir($directory)) {
            $routeFiles = File::files($directory);

            $excludeRoutes = ['base.php', 'api.php'];

            Route::group(
                [
                'middleware' => $this->middleware['frontend'],
                ], function () use ($routeFiles, $excludeRoutes) {
                    foreach ($routeFiles as $file) {
                        // Base.php is loaded from FrontendBaseRoutes method
                        if (!in_array($file->getFilename(), $excludeRoutes)) {
                            include $file;
                        }
                    }
                }
            );
        }
        return $this;
    }
public function mapFrontendRoutes()
    {
        $directory = base_path('routes');
        if(is_dir($directory)) {
            $routeFiles = File::files($directory);

            $excludeRoutes = ['base.php', 'api.php'];

            Route::group(
                [
                'middleware' => $this->middleware['frontend'],
                ], function () use ($routeFiles, $excludeRoutes) {
                    foreach ($routeFiles as $file) {
                        // Base.php is loaded from FrontendBaseRoutes method
                        if (!in_array($file->getFilename(), $excludeRoutes)) {
                            include $file;
                        }
                    }
                }
            );
        }
        return $this;
    }
public function mapFrontendRoutes ( ) { $ directory = base_path ( 'routes' ) ; if ( is_dir ( $ directory ) ) { $ routeFiles = File :: files ( $ directory ) ; $ excludeRoutes = [ 'base.php' , 'api.php' ] ; Route :: group ( [ 'middleware' => $ this -> middleware [ 'frontend' ] , ] , function ( ) use ( $ routeFiles , $ excludeRoutes ) { foreach ( $ routeFiles as $ file ) { // Base.php is loaded from FrontendBaseRoutes method if ( ! in_array ( $ file -> getFilename ( ) , $ excludeRoutes ) ) { include $ file ; } } } ) ; } return $ this ; }
Define front end routes

These routes are taken from /routes and are applied across all themes

@return $this
Define front end routes