Last active
November 12, 2025 21:40
-
-
Save jakebathman/15010bcaa72d6d5232dd1c9c19c0a837 to your computer and use it in GitHub Desktop.
Revisions
-
jakebathman revised this gist
Nov 1, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,6 @@ 'public', 'resources', 'routes', ]; $base = './'; -
jakebathman revised this gist
Nov 1, 2019 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ | Remove Laravel Comments |-------------------------------------------------------------------------- | | Just made a new Laravel project, but don't want all those big | comment blocks? Put this in the root of your project and run | "php remove_laravel_comments.php" | @@ -24,13 +24,13 @@ $base = './'; foreach ($directories as $dir) { $it = new RecursiveDirectoryIterator($base . $dir); foreach (new RecursiveIteratorIterator($it) as $file) { if ($file->getExtension() == 'php') { echo "Removing comments from: " . $file->getRealPath() . "\n"; $contents = file_get_contents($file->getRealPath()); $new = preg_replace('/^(\{?)\s*?\/\*(.|[\r\n])*?\*\/([\r\n]+$|$)/im', '$1', $contents); file_put_contents($file->getRealPath(), $new); } } } -
jakebathman revised this gist
May 17, 2019 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,7 @@ 'bootstrap', 'config', 'database', 'public', 'resources', 'routes', 'tests', -
jakebathman created this gist
Apr 6, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ <?php /* |-------------------------------------------------------------------------- | Remove Laravel Comments |-------------------------------------------------------------------------- | | Just made a new Laravel project, but don't want all those big | comment blocks? Put this in the root of your project and run | "php remove_laravel_comments.php" | */ $directories = [ 'app', 'bootstrap', 'config', 'database', 'resources', 'routes', 'tests', ]; $base = './'; foreach ($directories as $dir) { $it = new RecursiveDirectoryIterator($base . $dir); foreach (new RecursiveIteratorIterator($it) as $file) { if ($file->getExtension() == 'php') { echo "Removing comments from: " . $file->getRealPath() . "\n"; $contents = file_get_contents($file->getRealPath()); $new = preg_replace('/^(\{?)\s*?\/\*(.|[\r\n])*?\*\/([\r\n]+$|$)/im', '$1', $contents); file_put_contents($file->getRealPath(), $new); } } }