Welcome Guest, Not a member yet? Register   Sign In

I just interesting in one question, sorry, if it's duplicate thread, but I can't find answer.

I can't understand, why CI don't have a file database-sample.php, like others frameworks. And file database.php must be in .gitignore by default, IMHO.  It's easy to have two file database-sample.php and database.php, so why not?

What do understand a "database-sample.php" to contain?
"database.php" would normally be git-ignored because we expect it to hold database access credentials.

For example, laravel has two files .env and .env.example, where .env contains real database credentials, email settings, etc and .env.example contains standard fake data only for sharing purposes. If I download a repository I can quickly setup project, using .env.example and then rename it to .env.
It's good approach in laravel, so I just ask what do you think about it

Hmmm - isn't application/config/database.php pretty much what you described?
And the user guide (https://www.codeigniter.com/user_guide/d...ation.html) goes into more details.

As it is, you only need to create an environment-specific folder underneath aplicaiton/config, and copy then tailor any config files (eg database). You might have to make sure to git ignore them.

We have done this with CodeIgniter 4, with sample files to customize (.env, phpunit.xml.dit, Vagrantfile.dist), with the tailored files already git ignored.

Codeigniter version 4 looks very and very promising. So wait for stable release Smile and thanks for all contributors for their work making the CI better

Theme © iAndrew 2016 - Forum software by © MyBB