示例#1
1
 /**
  * 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;
 }
示例#2
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(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
$app->register(NonAppable\Webster\WebsterServiceProvider::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;
示例#3
0
文件: app.php 项目: efTobark/spaa
|
*/
$app->middleware([Illuminate\Cookie\Middleware\EncryptCookies::class, Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::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;
示例#4
0
|
*/
$app->middleware([Illuminate\Cookie\Middleware\EncryptCookies::class, Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::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(CodeAgenda\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' => 'CodeAgenda\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
示例#5
0
| 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(['Illuminate\\Session\\Middleware\\StartSession']);
// $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->configure('messenger');
$app->register('Cmgmyr\\Messenger\\MessengerServiceProvider');
/*
|--------------------------------------------------------------------------
| 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.
|
*/
require __DIR__ . '/../app/Http/routes.php';
return $app;
示例#6
0
| route or middleware that'll be assigned to some specific routes.
|
*/
$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) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
示例#7
0
文件: app.php 项目: r8/cv.r8.com.ua
| be global middleware that run before and after each request into a
| route or middleware that'll be assigned to some specific routes.
|
*/
$app->routeMiddleware(['referer_saver' => 'App\\Http\\Middleware\\RefererSaverMiddleware', 'request_log' => 'App\\Http\\Middleware\\RequestLogMiddleware']);
/*
|--------------------------------------------------------------------------
| 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\RequestLogServiceProvider::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;
示例#8
0
文件: app.php 项目: remusb/gemini
*/
$app->middleware([Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::class, LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware::class]);
$app->routeMiddleware(['check-authorization-params' => LucaDegasperi\OAuth2Server\Middleware\CheckAuthCodeRequestMiddleware::class, 'oauth' => LucaDegasperi\OAuth2Server\Middleware\OAuthMiddleware::class, 'oauth-owner' => LucaDegasperi\OAuth2Server\Middleware\OAuthOwnerMiddleware::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\ServiceProvider::class);
$app->register(Jenssegers\Mongodb\MongodbServiceProvider::class);
$app->register(Laravel\Socialite\SocialiteServiceProvider::class);
$app->register(\LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider::class);
$app->register(\LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider::class);
$app->withEloquent();
class_alias(Laravel\Socialite\Facades\Socialite::class, 'Socialite');
class_alias(Illuminate\Support\Facades\Config::class, 'Config');
$app->configure('services');
$app->configure('app');
$app->configure('secrets');
/*
|--------------------------------------------------------------------------
| Load The Application Routes
|--------------------------------------------------------------------------
示例#9
0
文件: app.php 项目: vtl3000/rest
<?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->register(Jenssegers\Mongodb\MongodbServiceProvider::class);
$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);
/*
示例#10
0
文件: app.php 项目: fungku/kwiki
//     // 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(Fungku\Kwiki\Providers\AppServiceProvider::class);
// $app->register(Fungku\Kwiki\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' => 'Fungku\\Kwiki\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
示例#11
0
| route or middleware that'll be assigned to some specific routes.
|
*/
$app->middleware([\Neomerx\CorsIlluminate\CorsMiddleware::class]);
$app->routeMiddleware(['jsonapi.basicAuth' => \App\Http\Middleware\JsonApiBasicAuth::class, 'jsonapi.jwtAuth' => \App\Http\Middleware\JsonApiJwtAuth::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\EventServiceProvider::class);
$app->register(\Neomerx\CorsIlluminate\Providers\LumenServiceProvider::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';
//});
示例#12
0
//     // Illuminate\Session\Middleware\StartSession::class,
//     // Illuminate\View\Middleware\ShareErrorsFromSession::class,
//     // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
// ]);
$app->routeMiddleware(['jwt.auth' => Tymon\JWTAuth\Middleware\GetUserFromToken::class, 'jwt.refresh' => Tymon\JWTAuth\Middleware\RefreshToken::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\CommandServiceProvider::class);
$app->register(Vluzrmos\Tinker\TinkerServiceProvider::class);
$app->register(\Telegram\Bot\Laravel\TelegramServiceProvider::class);
$app->register(\Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class);
$app->register(\GrahamCampbell\Throttle\ThrottleServiceProvider::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.
|
*/
示例#13
0
|
*/
$app->middleware([Nord\Lumen\Cors\Middleware\CorsMiddleware::class]);
$app->routeMiddleware(['oauth2' => Nord\Lumen\OAuth2\Middleware\OAuth2Middleware::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.
|
*/
// CORS
$app->register(Nord\Lumen\Cors\CorsServiceProvider::class);
// Doctrine
$app->register(Nord\Lumen\Doctrine\ORM\DoctrineServiceProvider::class);
// OAuth2
$app->register(Nord\Lumen\OAuth2\Doctrine\DoctrineServiceProvider::class);
$app->register(Nord\Lumen\OAuth2\OAuth2ServiceProvider::class);
// RBAC
$app->register(Nord\Lumen\Rbac\Doctrine\DoctrineStorageServiceProvider::class);
$app->register(Nord\Lumen\Rbac\RbacServiceProvider::class);
// Serializer
$app->register(Nord\Lumen\Serializer\SerializerServiceProvider::class);
// Date
$app->register(Jenssegers\Date\DateServiceProvider::class);
/*
|--------------------------------------------------------------------------
| Extend Managers
示例#14
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);
$app->register(App\Library\Repositories\BackendServiceProvider::class);
$app->register(App\Library\Shortener\ShortenerServiceProvider::class);
$app->register(App\Library\Utilities\UtilitiesServiceProvider::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) {
示例#15
0
// ]);
// $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);
$app->configure('twigbridge');
$app->register('TwigBridge\\ServiceProvider');
/*
|--------------------------------------------------------------------------
| 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;
*/
// $app->middleware([
//    App\Http\Middleware\ExampleMiddleware::class
// ]);
$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);
$app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class);
if (env('APP_DEBUG')) {
    //    $app->register(Barryvdh\Debugbar\LumenServiceProvider::class);
    $app->register(Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    $app->register(LaravelAngular\Generators\LaravelServiceProvider::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
示例#17
0
| 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(['LucaDegasperi\\OAuth2Server\\Middleware\\OAuthExceptionHandlerMiddleware', 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse']);
$app->routeMiddleware(['check-authorization-params' => 'Optimus\\OAuth2Server\\Middleware\\CheckAuthCodeRequestMiddleware', 'csrf' => 'Laravel\\Lumen\\Http\\Middleware\\VerifyCsrfToken', 'oauth' => 'Optimus\\OAuth2Server\\Middleware\\OAuthMiddleware', 'oauth-owner' => 'Optimus\\OAuth2Server\\Middleware\\OAuthOwnerMiddleware']);
/*
|--------------------------------------------------------------------------
| 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('LucaDegasperi\\OAuth2Server\\Storage\\FluentStorageServiceProvider');
$app->register('Optimus\\OAuth2Server\\OAuth2ServerServiceProvider');
/*
|--------------------------------------------------------------------------
| 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.
|
*/
require __DIR__ . '/../app/Http/routes.php';
return $app;
示例#18
0
文件: app.php 项目: pheelixx/autho
// ]);
$app->routeMiddleware(['check-authorization-params' => \LucaDegasperi\OAuth2Server\Middleware\CheckAuthCodeRequestMiddleware::class, 'csrf' => \Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class, 'oauth' => \LucaDegasperi\OAuth2Server\Middleware\OAuthMiddleware::class, 'oauth-client' => \LucaDegasperi\OAuth2Server\Middleware\OAuthClientOwnerMiddleware::class, 'oauth-user' => \LucaDegasperi\OAuth2Server\Middleware\OAuthUserOwnerMiddleware::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);
$app->register(\LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider::class);
$app->register(\LucaDegasperi\OAuth2Server\OAuth2ServerServiceProvider::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;
示例#19
0
    (new Dotenv\Dotenv(__DIR__ . '/../'))->load();
} catch (Dotenv\Exception\InvalidPathException $e) {
    //
}
/*
|--------------------------------------------------------------------------
| 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->register('Jenssegers\\Mongodb\\MongodbServiceProvider');
$app->register('Folklore\\Image\\ImageServiceProvider');
class_alias('Folklore\\Image\\Facades\\Image', 'Image');
$app->withEloquent();
$app->withFacades();
$app->configure('database');
$app->configure('image');
/*
|--------------------------------------------------------------------------
| 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.
|
示例#20
0
//     // Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
//     // Illuminate\Session\Middleware\StartSession::class,
//     // Illuminate\View\Middleware\ShareErrorsFromSession::class,
//     // Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class,
// ]);
$app->routeMiddleware(['bot' => 'Asuka\\Http\\Middleware\\BotMiddleware']);
/*
|--------------------------------------------------------------------------
| 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(Telegram\Bot\Laravel\TelegramServiceProvider::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' => 'Asuka\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
return $app;
示例#21
0
*/
$app->middleware([Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::class, Laravel\Lumen\Http\Middleware\VerifyCsrfToken::class, 'App\\Http\\Middleware\\RedirectToWwwMiddleware']);
// $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);
$app->register('Artesaos\\SEOTools\\Providers\\SEOToolsServiceProvider');
/*
|--------------------------------------------------------------------------
| 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;
示例#22
0
// ]);
//
// $app->routeMiddleware([
//     'cors' => App\Http\Middleware\CORS::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(Barryvdh\Cors\LumenServiceProvider::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->configure('cors');
$app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});
示例#23
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
// Load the dotenv file
(new Dotenv\Dotenv(__DIR__ . '/../'))->load();
// Create the application
$app = new Laravel\Lumen\Application(realpath(__DIR__ . '/../'));
// Bootstrap configuration and all other classes
$app->register(\App\Providers\Bootstrap\BootstrapServiceProvider::class);
return $app;
示例#24
0
//     // 'Illuminate\View\Middleware\ShareErrorsFromSession',
//     // 'Laravel\Lumen\Http\Middleware\VerifyCsrfToken',
// ]);
// $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');
# bind all calls to the emailer contract to use CAMPAIGN MONITOR
$app->bind('\\App\\V1\\Interfaces\\EmailerInterface', 'App\\V1\\Mailers\\CampaignMonitor');
# load the response codes config file
$app->configure('responsecodes');
$app->configure('protectedlists');
$app->configure('apikeys');
# register an event handler for the mail request event
Event::listen('RequestWasLogged', '\\App\\V1\\Events\\RequestWasLogged@handle');
/*
|--------------------------------------------------------------------------
| 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
示例#25
0
文件: app.php 项目: huycao/yodelivery
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->register('Jenssegers\\Mongodb\\MongodbServiceProvider');
//$app->register('Indatus\LaravelPSRedis\LaravelPSRedisServiceProvider');
$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', 'App\\Exceptions\\Handler');
$app->singleton('Illuminate\\Contracts\\Console\\Kernel', 'App\\Console\\Kernel');
$app->configure('vast');
示例#26
0
文件: app.php 项目: Cloudoki/crowd
// ]);
// $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);
$app->register(GrahamCampbell\Dropbox\DropboxServiceProvider::class);
class_alias('GrahamCampbell\\Dropbox\\Facades\\Dropbox', 'Dropbox');
/*
|--------------------------------------------------------------------------
| 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;
示例#27
0
//     // 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);
$app->register(Phileserver\Core\PhileserverServiceProvider::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;
示例#28
0
|
*/
$app->middleware([]);
$app->routeMiddleware(['jwt.auth' => Tymon\JWTAuth\Middleware\GetUserFromToken::class, 'jwt.refresh' => Tymon\JWTAuth\Middleware\RefreshToken::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\EventServiceProvider::class);
$app->register('Tymon\\JWTAuth\\Providers\\JWTAuthServiceProvider');
/*
|--------------------------------------------------------------------------
| 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;
示例#29
0
*/
$app->middleware([Barryvdh\Cors\HandleCors::class, Barryvdh\Cors\HandlePreflightSimple::class]);
// $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\EventServiceProvider::class);
$app->register(Dingo\Api\Provider\LumenServiceProvider::class);
$app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class);
app('Dingo\\Api\\Auth\\Auth')->extend('jwt', function ($app) {
    return new Dingo\Api\Auth\Provider\JWT($app['Tymon\\JWTAuth\\JWTAuth']);
});
$app->register(Barryvdh\Cors\LumenServiceProvider::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.
示例#30
0
| route or middleware that'll be assigned to some specific routes.
|
*/
$app->middleware([Illuminate\Session\Middleware\StartSession::class, Illuminate\View\Middleware\ShareErrorsFromSession::class]);
$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\JavascriptServiceProvider::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 asd the controllers that may handle them.
|
*/
//$auth->setUser(User::find(1));
$app->group(['namespace' => 'App\\Http\\Controllers'], function ($app) {
    require __DIR__ . '/../app/Http/routes.php';
});