Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. return [
  2. 'max-size-upload-video' => [
  3. 'type' => 'integer',
  4. 'title' => 'Set Maximum Size Upload Video',
  5. 'description' => 'Set the maximum size upload of videos',
  6. 'value' => '10000000',
  7. ],
  8. ];
  9.  
  10. class CustomLoadConfiguration extends LoadConfiguration
  11. {
  12. protected function loadConfigurationFiles(Application $app, RepositoryContract $config)
  13. {
  14. foreach ($this->getConfigurationFiles($app) as $key => $path) {
  15. if ($key === 'video') {
  16. $values = require $path;
  17. if (is_array($values)) {
  18. foreach ($values as $k => $value) {
  19. $config->set($k, $value);
  20. }
  21. } else $config->set($key, $values);
  22. } else {
  23. $config->set($key, require $path);
  24. }
  25. }
  26. }
  27. }
  28.  
  29. protected function bootstrappers()
  30. {
  31. $bootstrappers = parent::bootstrappers();
  32. if (($key = array_search($bootstrappers, 'IlluminateFoundationBootstrapLoadConfiguration')) !== FALSE) {
  33. $bootstrappers[$key] = 'YourNamespaceCustomLoadConfiguration';
  34. }
  35.  
  36. return $bootstrappers;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement