app.php 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. // Copyright 2019 Hackware SpA <https://hackware.cl>.
  3. // This file is part of "Hackware's Digital Wallet" and licensed under the
  4. // terms of the GNU Affero General Public License version 3, or (at your
  5. // option) a later version. You should have received a copy of this license
  6. // along with the software. If not, see <https://www.gnu.org/licenses/>.
  7. require_once __DIR__ . '/../vendor/autoload.php';
  8. // Dotenv
  9. (new Laravel\Lumen\Bootstrap\LoadEnvironmentVariables(
  10. dirname(__DIR__),
  11. env('APP_ENV') ? '.env.' . env('APP_ENV') : '.env'
  12. ))->bootstrap();
  13. // Create application
  14. $app = new Laravel\Lumen\Application(
  15. dirname(__DIR__)
  16. );
  17. // Custom configuration
  18. // In order to configure other packages, copy its configuration files into
  19. // the config/ dir and add it with $app->configure('file-without-ext').
  20. $app->configure('app');
  21. $app->configure('cors');
  22. // Load default service providers and service container bindings.
  23. // Add other service providers using $app->register.
  24. $app->register(Hawese\Core\Providers\CoreServiceProvider::class);
  25. return $app;