What’s the diff between bootstart/app.php and config/app.php?
Permalink 1 user found helpful
I am needing to load certain assets for a block. I see that I need to add that asset to the app.php. However, there are many app.php’s
Presumably I want to only edit files under application, as this the where I override those in concrete.
But I do not understand the diff between bootstrap file and config files.
they are both empty, but bootstrap/app.php has a not of comments in it wit nite on how to tweak it, while config/app/php has one line only in it “return array();”
Under what circumstances is bootstrap/app.php called vs config/app.php? What would I put in one vs the other?
application/bootstrap/app.php application/config/app.php concrete/bootstrap/app.php concrete/config/app.php
Presumably I want to only edit files under application, as this the where I override those in concrete.
But I do not understand the diff between bootstrap file and config files.
they are both empty, but bootstrap/app.php has a not of comments in it wit nite on how to tweak it, while config/app/php has one line only in it “return array();”
Under what circumstances is bootstrap/app.php called vs config/app.php? What would I put in one vs the other?
correction.. there is no app.php in concrete/bootstrap. it is in concrete/config/install
found part of the answer here ->
https://www.concrete5.org/documentation/developers/5.7/environment/d...
Though still nto clear as to which one to edit
https://www.concrete5.org/documentation/developers/5.7/environment/d...
Though still nto clear as to which one to edit
The concrete directory is only for core stuff, you shouldn't ever be editing anything within that directory. Therefore, we can ignore "concrete/bootstrap" and "concrete/config".
The bootstrap folder is meant for procedural code for generating a concrete5 app while the config folder is for php files that act as key value stores.
Now to clear up your question, the truth is it's fine to put in either bootstrap or config, but config is easier, cleaner, and overridable. If you'd like to implement it with the bootstrap file, an example is written in comments here: https://github.com/concrete5/concrete5-5.7.0/blob/develop/web/applic...
Otherwise you can look to `concrete/config/app.php` for the format assets are to be defined in:
The bootstrap folder is meant for procedural code for generating a concrete5 app while the config folder is for php files that act as key value stores.
Now to clear up your question, the truth is it's fine to put in either bootstrap or config, but config is easier, cleaner, and overridable. If you'd like to implement it with the bootstrap file, an example is written in comments here: https://github.com/concrete5/concrete5-5.7.0/blob/develop/web/applic...
Otherwise you can look to `concrete/config/app.php` for the format assets are to be defined in:
great answer! exactyl what I wanted to know :) thanks
Hi Korvin,
How would you access such a config param?
When I try
the return value is always empty..
Any idea?
BR Jan
How would you access such a config param?
When I try
<?php echo Config::get('app.xxx'); ?>
the return value is always empty..
Any idea?
BR Jan