How to edit and save custom config files in Laravel?

前端 未结 4 744
鱼传尺愫
鱼传尺愫 2021-02-04 16:47

I am creating simple web application in Laravel 4. I have backend for managing applications content. As a part of backend i want to have UI to manage applications settings. I wa

4条回答
  •  情话喂你
    2021-02-04 17:06

    I did it like this ...

    config(['YOURKONFIG.YOURKEY' => 'NEW_VALUE']);
    $fp = fopen(base_path() .'/config/YOURKONFIG.php' , 'w');
    fwrite($fp, '

提交回复
热议问题