Laravel - where to store site config data -


i have got option disable/enable registration of users. should store data? best practise?

i think, store little data in db not solution.

hope know concept of environment variables

in laravel stored in .env.php file

<?php  return [     'user_registration'  => 'enable/disable' ];  ?> 

you can retrieve value

$_env['user_registration'] 

and manipulate function accordingly. ex. if enable show form else hide views

documentation:

http://laravel.com/docs/4.2/configuration#environment-configuration


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -