Laravel Classroom image

Prashant  Nigam / Student / Web Technology

To post your Question Join Classroom
Lesson Topics's No:-  First|1 | 2 | 3|

19.3 Setting Configuration
To set a configuration item, use the set() method. The first parameter represents the file and
configuration item name, in the same format as the get() method. The second parameter is the
value you wish to set.
1 <?php
3 Config::set('ourconfig.size', 7);
If a configuration item exists within a configuration file, it will be written in the runtime
configuration when you use set(), however it will not be overwritten in the configuration file
itself. If a configuration item doesn’t exist, a call to the set() method will create it, but again
not within the configuration file.
Try to put as many configurable settings as possible from your application into configuration
files, it will make it much easier to configure if you have to move or redistribute the application.



Prashant  Nigam

Skills    Laravel

Qualifications :-
Location :-,,,

  Students (0)