/**
  * Creates the application.
  *
  * @return \Laravel\Lumen\Application
  */
 public function createApplication()
 {
     $app = new Laravel\Lumen\Application(realpath(__DIR__));
     $app->withFacades();
     $app->configure('swagger-lume');
     $app->singleton(Illuminate\Contracts\Console\Kernel::class, ConsoleKernel::class);
     $app->register(\SwaggerLume\ServiceProvider::class);
     $app->group(['namespace' => 'SwaggerLume'], function ($app) {
         require __DIR__ . '/../src/routes.php';
     });
     return $app;
 }
 public function setUp()
 {
     \Dotenv::load(__DIR__ . '/../');
     $app = new \Laravel\Lumen\Application(realpath(__DIR__ . '/../'));
     $app->withFacades();
     $this->model = 'QueryParser\\Tests\\BaseModel';
 }
Beispiel #3
0
 /**
  * Creates the application.
  *
  * @return \Laravel\Lumen\Application
  */
 public function createApplication()
 {
     if (!class_exists('Laravel\\Lumen\\Application')) {
         require_once __DIR__ . '/../vendor/autoload.php';
     }
     $app = new \Laravel\Lumen\Application(realpath(__DIR__));
     $app->withFacades();
     $app->withEloquent();
     return $app;
 }
Beispiel #4
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
Dotenv::load(__DIR__ . '/../');
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| Here we will load the environment and create the application instance
| that serves as the central piece of this framework. We'll use this
| application as an "IoC" container and router for this framework.
|
*/
$app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../'));
$app->withFacades();
$app->withEloquent();
/*
|--------------------------------------------------------------------------
| Register Container Bindings
|--------------------------------------------------------------------------
|
| Now we will register a few bindings in the service container. We will
| register the exception handler and the console kernel. You may add
| your own bindings here if you like or you can make another file.
|
*/
$app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, App\Exceptions\Handler::class);
$app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class);
/*
|--------------------------------------------------------------------------