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

javascript - Js, document.getElementById("ID").innerHTML, error -

jquery - jqGrid update specific column data with out refreshing the entire column? -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -