/**
  * 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;
 }
Exemple #2
0
//     // Illuminate\View\Middleware\ShareErrorsFromSession::class,
//     // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
// ]);
// $app->routeMiddleware([
// ]);
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
// $app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
Exemple #3
0
*/
$app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, Padarom\Thunderstorm\Exceptions\Handler::class);
$app->singleton(Illuminate\Contracts\Console\Kernel::class, Padarom\Thunderstorm\Console\Kernel::class);
/*
|--------------------------------------------------------------------------
| Register Middleware
|--------------------------------------------------------------------------
|
| Next, we will register the middleware with the application. These can
| be global middleware that run before and after each request into a
| route or middleware that'll be assigned to some specific routes.
|
*/
// $app->middleware([
//    Padarom\Thunderstorm\Http\Middleware\ExampleMiddleware::class
// ]);
$app->routeMiddleware(['run-import' => Padarom\Thunderstorm\Http\Middleware\RunImport::class]);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'Padarom\\Thunderstorm\\Http\\Controllers', 'middleware' => 'run-import'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
Exemple #4
0
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->register(App\Providers\ObserverServiceProvider::class);
$app->register(Nebo15\REST\ServiceProvider::class);
$app->register(Nebo15\Changelog\ServiceProvider::class);
$app->register(App\Providers\ValidationServiceProvider::class);
$app->register(Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
$app->register(App\Providers\BugsnagServiceProvider::class);
$app->register(\Nebo15\LumenMixpanel\MixpanelServiceProvider::class);
$app->register(\Nebo15\LumenIntercom\IntercomServiceProvider::class);
$app->register(Nebo15\LumenOauth2\Providers\ServiceProvider::class);
$app->register(Nebo15\LumenApplicationable\ServiceProvider::class);
$app->register(App\Providers\AppServiceProvider::class);
$app->register(App\Providers\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group([], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
// ]);
// $app->routeMiddleware([
//     'auth' => App\Http\Middleware\Authenticate::class,
// ]);
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
// $app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) use($lumenAppDir) {
    require $lumenAppDir . '/app/Http/routes.php';
});
return $app;
Exemple #6
0
$app->register(Prettus\Repository\Providers\LumenRepositoryServiceProvider::class);
$app->register(Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class);
$app->register(App\Providers\SupplierServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'App\\Http\\Controllers\\Frontend'], function ($app) {
    $namespace = 'App\\Http\\Controllers\\Frontend';
    $prefix = '';
    $group = compact('namespace', 'prefix');
    require __DIR__ . '/../app/Http/routes.php';
});
$app->group(['namespace' => 'App\\Http\\Controllers\\V1', 'middleware' => ['cors'], 'prefix' => 'api/v1'], function ($app) {
    $namespace = 'App\\Http\\Controllers\\V1';
    $middleware = ['cors'];
    $prefix = 'api/v1';
    $group = compact('namespace', 'middleware', 'prefix');
    $api = app(Dingo\Api\Routing\Router::class);
    $api->version('v1', function ($api) use($namespace, $middleware, $prefix, $group) {
        $api->group(['namespace' => $namespace, 'middleware' => $middleware, 'prefix' => 'v1'], function ($api) use($namespace, $middleware, $prefix, $group) {
            require __DIR__ . '/../app/Http/api.php';
        });
    });
});
return $app;
Exemple #7
0
*/
// $app->middleware([
//    App\Http\Middleware\ExampleMiddleware::class
// ]);
$app->routeMiddleware(['auth' => Demeter\Http\Middleware\Authenticate::class]);
// $app->middleware([Illuminate\Session\Middleware\StartSession::class]);
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->register(Demeter\Providers\CmdServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'Demeter\\Http\\Controllers', 'prefix' => $_ENV['URL_ROOT'] . 'api/public/'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
Exemple #8
0
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->register(Barryvdh\Debugbar\LumenServiceProvider::class);
$app->configure('debugbar');
$app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
// $app->register(Appzcoder\LumenRoutesList\RoutesCommandServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'App\\Http\\Controllers', 'middleware' => 'cors'], function ($app) {
    $env = env('APP_ENV');
    if (strtolower($env) == 'prod') {
        require __DIR__ . '/../app/Http/routes.php';
    } else {
        require __DIR__ . '/../app/Http/routes_init.php';
    }
});
$app->group(['namespace' => 'App\\Oauth\\Controllers', 'middleware' => 'cors'], function ($app) {
    require __DIR__ . '/../app/Oauth/routes.php';
});
return $app;
Exemple #9
0
| route or middleware that'll be assigned to some specific routes.
|
*/
$app->middleware([Illuminate\Cookie\Middleware\EncryptCookies::class, Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::class]);
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->configure('app');
$app->register(Admin\Providers\AppServiceProvider::class);
//$app->register(App\Providers\DatabaseServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'Admin\\Http\\Controllers'], function () use($app) {
    $app->get('image/{variant}/{path:[a-zA-Z0-9_\\-\\/\\.]*}', array('uses' => 'ImageController@image'));
});
return $app;
Exemple #10
0
//    Chxj1992\ApplesDataCenter\App\Http\Middleware\ExampleMiddleware::class
// ]);
// $app->routeMiddleware([
//     'auth' => Chxj1992\ApplesDataCenter\App\Http\Middleware\Authenticate::class,
// ]);
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->register(Chxj1992\ApplesDataCenter\App\Providers\AppServiceProvider::class);
$app->register(Chxj1992\ApplesDataCenter\App\Providers\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'Chxj1992\\ApplesDataCenter\\App\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
Exemple #11
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| 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->configure('lazy-strings');
$app->register(Nobox\LazyStrings\LazyStringsServiceProvider::class);
$app->get('/', function () use($app) {
    return $app->welcome();
});
use Illuminate\Support\Facades\Config;
$app->group(['namespace' => 'Nobox\\LazyStrings\\Http\\Controllers', 'prefix' => 'lazy'], function () use($app) {
    $routeName = Config::get('lazy-strings.strings-route');
    $app->get($routeName, ['as' => 'lazy.deploy', 'uses' => 'LazyStringsController@deploy']);
});
return $app;
Exemple #12
0
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->register('App\\Providers\\AppServiceProvider');
$app->register('App\\Providers\\ValidationServiceProvider');
$app->register('App\\Providers\\TranslatorServiceProvider');
$app->register('Vluzrmos\\SlackApi\\SlackApiServiceProvider');
$app->register('Vluzrmos\\BadgePoser\\BadgePoserServiceProvider');
$app->register('Vluzrmos\\LanguageDetector\\Providers\\LanguageDetectorServiceProvider');
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
// if you are using URI language detector driver, uncomment this line
// $options['prefix'] = app('language.routePrefix');
$options['namespace'] = 'App\\Http\\Controllers';
$app->group($options, function () use($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
Exemple #13
0
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
// $app->register(App\Providers\AppServiceProvider::class);
$app->register(App\Providers\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['middleware' => 'oauth', 'namespace' => 'App\\ThunderID\\OrganisationManagementV1\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/ThunderID/OrganisationManagementV1/Http/routes.php';
});
$app->group(['middleware' => 'oauth', 'namespace' => 'App\\ThunderID\\EmploymentSystemV1\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/ThunderID/EmploymentSystemV1/Http/routes.php';
});
$app->group(['namespace' => 'App\\ThunderID\\WorkforceManagementV1\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/ThunderID/WorkforceManagementV1/Http/routes.php';
});
$app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
Exemple #14
0
// ]);
// $app->routeMiddleware([
//     'auth' => App\Http\Middleware\Authenticate::class,
// ]);
/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->register(Redford\Core\Provider\AppServiceProvider::class);
$app->register(Redford\Core\Provider\EventServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
|
| Next we will include the routes file so that they can all be added to
| the application. This will provide all of the URLs the application
| can respond to, as well as the controllers that may handle them.
|
*/
$app->group(['namespace' => 'Redford'], function ($app) {
    require __DIR__ . '/../src/routes.php';
});
$app->configure('api');
return $app;