Skip to content

Instantly share code, notes, and snippets.

@codeitlikemiley
Last active June 8, 2019 04:32
Show Gist options
  • Select an option

  • Save codeitlikemiley/d6e1460d97bf9f0def59c3200cac46ad to your computer and use it in GitHub Desktop.

Select an option

Save codeitlikemiley/d6e1460d97bf9f0def59c3200cac46ad to your computer and use it in GitHub Desktop.
Search And Replace Config File in laravel
diff --git a/config/app.php b/config/app.php
index c9960cd..29a3a1c 100644
--- a/config/app.php
+++ b/config/app.php
@@ -171,7 +171,7 @@ return [
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
- // App\Providers\BroadcastServiceProvider::class,
+ App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
$path_to_file = config_path('app.php');
$file_contents = file_get_contents($path_to_file);
$file_contents = str_replace("// App\Providers\BroadcastServiceProvider::class," , "App\Providers\BroadcastServiceProvider::class," ,$file_contents);
file_put_contents($path_to_file,$file_contents);
// the following can be used
// tab = \t
// newline = \n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment