diff options
author | Camil Staps | 2016-01-04 15:12:59 +0100 |
---|---|---|
committer | Camil Staps | 2016-01-04 15:12:59 +0100 |
commit | 9c4afbed2310aa0c4679d11b9f568c234d202554 (patch) | |
tree | 65e8956b671239f2ec38789ce59a4cea9af0ebc2 /app |
Initial commit
Diffstat (limited to 'app')
-rw-r--r-- | app/Console/Commands/.gitkeep | 0 | ||||
-rw-r--r-- | app/Console/Kernel.php | 29 | ||||
-rw-r--r-- | app/Events/Event.php | 10 | ||||
-rw-r--r-- | app/Exceptions/Handler.php | 44 | ||||
-rw-r--r-- | app/Http/Controllers/Controller.php | 10 | ||||
-rw-r--r-- | app/Http/Middleware/ExampleMiddleware.php | 20 | ||||
-rw-r--r-- | app/Http/routes.php | 16 | ||||
-rw-r--r-- | app/Jobs/Job.php | 25 | ||||
-rw-r--r-- | app/Listeners/Listener.php | 11 | ||||
-rw-r--r-- | app/Providers/AppServiceProvider.php | 18 | ||||
-rw-r--r-- | app/Providers/EventServiceProvider.php | 19 |
11 files changed, 202 insertions, 0 deletions
diff --git a/app/Console/Commands/.gitkeep b/app/Console/Commands/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/Console/Commands/.gitkeep diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php new file mode 100644 index 0000000..ad6e311 --- /dev/null +++ b/app/Console/Kernel.php @@ -0,0 +1,29 @@ +<?php + +namespace App\Console; + +use Illuminate\Console\Scheduling\Schedule; +use Laravel\Lumen\Console\Kernel as ConsoleKernel; + +class Kernel extends ConsoleKernel +{ + /** + * The Artisan commands provided by your application. + * + * @var array + */ + protected $commands = [ + // + ]; + + /** + * Define the application's command schedule. + * + * @param \Illuminate\Console\Scheduling\Schedule $schedule + * @return void + */ + protected function schedule(Schedule $schedule) + { + // + } +} diff --git a/app/Events/Event.php b/app/Events/Event.php new file mode 100644 index 0000000..b8230f0 --- /dev/null +++ b/app/Events/Event.php @@ -0,0 +1,10 @@ +<?php + +namespace App\Events; + +use Illuminate\Queue\SerializesModels; + +abstract class Event +{ + use SerializesModels; +} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php new file mode 100644 index 0000000..8d0b13e --- /dev/null +++ b/app/Exceptions/Handler.php @@ -0,0 +1,44 @@ +<?php + +namespace App\Exceptions; + +use Exception; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Laravel\Lumen\Exceptions\Handler as ExceptionHandler; + +class Handler extends ExceptionHandler +{ + /** + * A list of the exception types that should not be reported. + * + * @var array + */ + protected $dontReport = [ + HttpException::class, + ]; + + /** + * Report or log an exception. + * + * This is a great spot to send exceptions to Sentry, Bugsnag, etc. + * + * @param \Exception $e + * @return void + */ + public function report(Exception $e) + { + return parent::report($e); + } + + /** + * Render an exception into an HTTP response. + * + * @param \Illuminate\Http\Request $request + * @param \Exception $e + * @return \Illuminate\Http\Response + */ + public function render($request, Exception $e) + { + return parent::render($request, $e); + } +} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php new file mode 100644 index 0000000..0ccb918 --- /dev/null +++ b/app/Http/Controllers/Controller.php @@ -0,0 +1,10 @@ +<?php + +namespace App\Http\Controllers; + +use Laravel\Lumen\Routing\Controller as BaseController; + +class Controller extends BaseController +{ + // +} diff --git a/app/Http/Middleware/ExampleMiddleware.php b/app/Http/Middleware/ExampleMiddleware.php new file mode 100644 index 0000000..166581c --- /dev/null +++ b/app/Http/Middleware/ExampleMiddleware.php @@ -0,0 +1,20 @@ +<?php + +namespace App\Http\Middleware; + +use Closure; + +class ExampleMiddleware +{ + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + return $next($request); + } +} diff --git a/app/Http/routes.php b/app/Http/routes.php new file mode 100644 index 0000000..5ecfcd1 --- /dev/null +++ b/app/Http/routes.php @@ -0,0 +1,16 @@ +<?php + +/* +|-------------------------------------------------------------------------- +| Application Routes +|-------------------------------------------------------------------------- +| +| Here is where you can register all of the routes for an application. +| It is a breeze. Simply tell Lumen the URIs it should respond to +| and give it the Closure to call when that URI is requested. +| +*/ + +$app->get('/', function () use ($app) { + return $app->welcome(); +}); diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php new file mode 100644 index 0000000..2bc4975 --- /dev/null +++ b/app/Jobs/Job.php @@ -0,0 +1,25 @@ +<?php + +namespace App\Jobs; + +use Illuminate\Bus\Queueable; +use Illuminate\Queue\SerializesModels; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Contracts\Bus\SelfHandling; +use Illuminate\Contracts\Queue\ShouldQueue; + +abstract class Job implements SelfHandling, ShouldQueue +{ + /* + |-------------------------------------------------------------------------- + | Queueable Jobs + |-------------------------------------------------------------------------- + | + | This job base class provides a central location to place any logic that + | is shared across all of your jobs. The trait included with the class + | provides access to the "queueOn" and "delay" queue helper methods. + | + */ + + use InteractsWithQueue, Queueable, SerializesModels; +} diff --git a/app/Listeners/Listener.php b/app/Listeners/Listener.php new file mode 100644 index 0000000..d346fc1 --- /dev/null +++ b/app/Listeners/Listener.php @@ -0,0 +1,11 @@ +<?php + +namespace App\Listeners; + +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Contracts\Queue\ShouldQueue; + +abstract class Listener +{ + // +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php new file mode 100644 index 0000000..ddec046 --- /dev/null +++ b/app/Providers/AppServiceProvider.php @@ -0,0 +1,18 @@ +<?php + +namespace App\Providers; + +use Illuminate\Support\ServiceProvider; + +class AppServiceProvider extends ServiceProvider +{ + /** + * Register any application services. + * + * @return void + */ + public function register() + { + // + } +} diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php new file mode 100644 index 0000000..ff72210 --- /dev/null +++ b/app/Providers/EventServiceProvider.php @@ -0,0 +1,19 @@ +<?php + +namespace App\Providers; + +use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; + +class EventServiceProvider extends ServiceProvider +{ + /** + * The event listener mappings for the application. + * + * @var array + */ + protected $listen = [ + 'App\Events\SomeEvent' => [ + 'App\Listeners\EventListener', + ], + ]; +} |