Support the ongoing development of →
Configuration Database Architecture
Last updated 10 months ago.

You can do this by placing your custom config file in config directory.

  • config/custom.php

    <?php return [ 'test' => [ 'url' => 'this is a test url' ] ];

you can access this by 'config' helper function

$url = config('custom.test.url')

this will return " this is a test ur l"

Last updated 7 years ago.

Thanks @mrabbani that helped me so far to store those data. Perfect.

BUT: How can i write them into that config? :) Or do i really have to put them into the DB?


I just found: The set() and the get() on Config.

But the data (for example test.url) is not saved to the config/custom.php


No, custom configuration created by Config::set() is not stored to your config files. You really should be using a database table to store that.


Sign in to participate in this thread!


Your banner here too?

phoenixh phoenixh Joined 30 Nov 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 - All rights reserved.