Amranidev\ScaffoldInterface\Http\Controllers\GuiController::clearRoutes PHP Метод

clearRoutes() приватный Метод

Clear routes.
private clearRoutes ( string $remove ) : mixed
$remove string
Результат mixed
    private function clearRoutes($remove)
    {
        $path = config('amranidev.config.routes');
        $lines = file($path, FILE_IGNORE_NEW_LINES);
        foreach ($lines as $key => $line) {
            if (strstr($line, $remove)) {
                unset($lines[$key]);
            }
        }
        $data = implode("\n", array_values($lines));
        return file_put_contents($path, $data);
    }