Skip to content

Instantly share code, notes, and snippets.

@skadimoolam
Created June 20, 2020 14:47
Show Gist options
  • Save skadimoolam/c35c461cb11a44b0b806e832efd6b8d4 to your computer and use it in GitHub Desktop.
Save skadimoolam/c35c461cb11a44b0b806e832efd6b8d4 to your computer and use it in GitHub Desktop.

Revisions

  1. skadimoolam created this gist Jun 20, 2020.
    9 changes: 9 additions & 0 deletions newConfig.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <?php

    $rawSettings = json_decode($request->get('settings'), true);
    if ($rawSettings == null) abort(500);

    config(['settings' => $rawSettings]);

    $text = '<?php return ' . var_export(config('settings'), true) . ';';
    file_put_contents(config_path('settings.php'), $text);