Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return [
- 'max-size-upload-video' => [
- 'type' => 'integer',
- 'title' => 'Set Maximum Size Upload Video',
- 'description' => 'Set the maximum size upload of videos',
- 'value' => '10000000',
- ],
- ];
- class CustomLoadConfiguration extends LoadConfiguration
- {
- protected function loadConfigurationFiles(Application $app, RepositoryContract $config)
- {
- foreach ($this->getConfigurationFiles($app) as $key => $path) {
- if ($key === 'video') {
- $values = require $path;
- if (is_array($values)) {
- foreach ($values as $k => $value) {
- $config->set($k, $value);
- }
- } else $config->set($key, $values);
- } else {
- $config->set($key, require $path);
- }
- }
- }
- }
- protected function bootstrappers()
- {
- $bootstrappers = parent::bootstrappers();
- if (($key = array_search($bootstrappers, 'IlluminateFoundationBootstrapLoadConfiguration')) !== FALSE) {
- $bootstrappers[$key] = 'YourNamespaceCustomLoadConfiguration';
- }
- return $bootstrappers;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement