You can do this by placing your custom config file in
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"
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: http://tutsnare.com/how-to-create-custom-configuration-in-lara... 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.
Thank you @delatbabel
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.