summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2016-01-22 12:01:33 +0100
committerCamil Staps2016-01-22 12:01:33 +0100
commit3a74377e861c1a401f1dffbd595f547e04eb72c8 (patch)
tree505649f58784ed0e318cb46f28777173bcdc6b90
Initial commitlumen-app
-rw-r--r--.env.example13
-rw-r--r--.gitignore4
-rw-r--r--app/Console/Commands/.gitkeep0
-rw-r--r--app/Console/Kernel.php29
-rw-r--r--app/Events/Event.php10
-rw-r--r--app/Events/ExampleEvent.php16
-rw-r--r--app/Exceptions/Handler.php50
-rw-r--r--app/Http/Controllers/Controller.php10
-rw-r--r--app/Http/Controllers/ExampleController.php18
-rw-r--r--app/Http/Middleware/Authenticate.php44
-rw-r--r--app/Http/Middleware/ExampleMiddleware.php20
-rw-r--r--app/Http/routes.php16
-rw-r--r--app/Jobs/ExampleJob.php26
-rw-r--r--app/Jobs/Job.php24
-rw-r--r--app/Listeners/ExampleListener.php31
-rw-r--r--app/Providers/AppServiceProvider.php18
-rw-r--r--app/Providers/AuthServiceProvider.php40
-rw-r--r--app/Providers/EventServiceProvider.php19
-rw-r--r--app/User.php34
-rw-r--r--artisan35
-rw-r--r--bootstrap/app.php100
-rw-r--r--composer.json27
-rw-r--r--database/factories/ModelFactory.php19
-rw-r--r--database/migrations/.gitkeep0
-rw-r--r--database/seeds/DatabaseSeeder.php16
-rw-r--r--phpunit.xml26
-rw-r--r--public/.htaccess16
-rw-r--r--public/index.php28
-rw-r--r--readme.md21
-rw-r--r--resources/views/.gitkeep0
-rw-r--r--storage/app/.gitignore2
-rw-r--r--storage/framework/views/.gitignore2
-rw-r--r--storage/logs/.gitignore2
-rw-r--r--tests/ExampleTest.php20
-rw-r--r--tests/TestCase.php14
35 files changed, 750 insertions, 0 deletions
diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..f341890
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,13 @@
+APP_ENV=local
+APP_DEBUG=true
+APP_KEY=SomeRandomKey!!!
+
+DB_CONNECTION=mysql
+DB_HOST=localhost
+DB_PORT=3306
+DB_DATABASE=homestead
+DB_USERNAME=homestead
+DB_PASSWORD=secret
+
+CACHE_DRIVER=memcached
+QUEUE_DRIVER=sync
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..18a13a3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/vendor
+.env
+composer.lock
+
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/Events/ExampleEvent.php b/app/Events/ExampleEvent.php
new file mode 100644
index 0000000..4bd1268
--- /dev/null
+++ b/app/Events/ExampleEvent.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace App\Events;
+
+class ExampleEvent extends Event
+{
+ /**
+ * Create a new event instance.
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ //
+ }
+}
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
new file mode 100644
index 0000000..abb8a44
--- /dev/null
+++ b/app/Exceptions/Handler.php
@@ -0,0 +1,50 @@
+<?php
+
+namespace App\Exceptions;
+
+use Exception;
+use Illuminate\Validation\ValidationException;
+use Illuminate\Auth\Access\AuthorizationException;
+use Illuminate\Database\Eloquent\ModelNotFoundException;
+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 = [
+ AuthorizationException::class,
+ HttpException::class,
+ ModelNotFoundException::class,
+ ValidationException::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)
+ {
+ 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/Controllers/ExampleController.php b/app/Http/Controllers/ExampleController.php
new file mode 100644
index 0000000..aab066e
--- /dev/null
+++ b/app/Http/Controllers/ExampleController.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace App\Http\Controllers;
+
+class ExampleController extends Controller
+{
+ /**
+ * Create a new controller instance.
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ //
+ }
+
+ //
+}
diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php
new file mode 100644
index 0000000..361a11e
--- /dev/null
+++ b/app/Http/Middleware/Authenticate.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace App\Http\Middleware;
+
+use Closure;
+use Illuminate\Contracts\Auth\Factory as Auth;
+
+class Authenticate
+{
+ /**
+ * The authentication guard factory instance.
+ *
+ * @var \Illuminate\Contracts\Auth\Factory
+ */
+ protected $auth;
+
+ /**
+ * Create a new middleware instance.
+ *
+ * @param \Illuminate\Contracts\Auth\Factory $auth
+ * @return void
+ */
+ public function __construct(Auth $auth)
+ {
+ $this->auth = $auth;
+ }
+
+ /**
+ * Handle an incoming request.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param \Closure $next
+ * @param string|null $guard
+ * @return mixed
+ */
+ public function handle($request, Closure $next, $guard = null)
+ {
+ if ($this->auth->guard($guard)->guest()) {
+ return response('Unauthorized.', 401);
+ }
+
+ return $next($request);
+ }
+}
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..f2c5b17
--- /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->version();
+});
diff --git a/app/Jobs/ExampleJob.php b/app/Jobs/ExampleJob.php
new file mode 100644
index 0000000..7b65bb4
--- /dev/null
+++ b/app/Jobs/ExampleJob.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace App\Jobs;
+
+class ExampleJob extends Job
+{
+ /**
+ * Create a new job instance.
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ //
+ }
+
+ /**
+ * Execute the job.
+ *
+ * @return void
+ */
+ public function handle()
+ {
+ //
+ }
+}
diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php
new file mode 100644
index 0000000..7c873e1
--- /dev/null
+++ b/app/Jobs/Job.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace App\Jobs;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Queue\SerializesModels;
+use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Contracts\Queue\ShouldQueue;
+
+abstract class Job implements 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/ExampleListener.php b/app/Listeners/ExampleListener.php
new file mode 100644
index 0000000..77fc6a8
--- /dev/null
+++ b/app/Listeners/ExampleListener.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace App\Listeners;
+
+use App\Events\ExampleEvent;
+use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Contracts\Queue\ShouldQueue;
+
+class ExampleListener
+{
+ /**
+ * Create the event listener.
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ //
+ }
+
+ /**
+ * Handle the event.
+ *
+ * @param ExampleEvent $event
+ * @return void
+ */
+ public function handle(ExampleEvent $event)
+ {
+ //
+ }
+}
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/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php
new file mode 100644
index 0000000..3565688
--- /dev/null
+++ b/app/Providers/AuthServiceProvider.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace App\Providers;
+
+use App\User;
+use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\Facades\Gate;
+use Illuminate\Support\ServiceProvider;
+
+class AuthServiceProvider extends ServiceProvider
+{
+ /**
+ * Register any application services.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ //
+ }
+
+ /**
+ * Boot the authentication services for the application.
+ *
+ * @return void
+ */
+ public function boot()
+ {
+ // Here you may define how you wish users to be authenticated for your Lumen
+ // application. The callback which receives the incoming request instance
+ // should return either a User instance or null. You're free to obtain
+ // the User instance via an API token or any other method necessary.
+
+ Auth::viaRequest('api', function ($request) {
+ if ($request->input('api_token')) {
+ return User::where('api_token', $request->input('api_token'))->first();
+ }
+ });
+ }
+}
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
new file mode 100644
index 0000000..0b8f393
--- /dev/null
+++ b/app/Providers/EventServiceProvider.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace App\Providers;
+
+use Laravel\Lumen\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',
+ ],
+ ];
+}
diff --git a/app/User.php b/app/User.php
new file mode 100644
index 0000000..fd4de31
--- /dev/null
+++ b/app/User.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace App;
+
+use Illuminate\Auth\Authenticatable;
+use Laravel\Lumen\Auth\Authorizable;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
+use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
+
+class User extends Model implements
+ AuthenticatableContract,
+ AuthorizableContract
+{
+ use Authenticatable, Authorizable;
+
+ /**
+ * The attributes that are mass assignable.
+ *
+ * @var array
+ */
+ protected $fillable = [
+ 'name', 'email',
+ ];
+
+ /**
+ * The attributes excluded from the model's JSON form.
+ *
+ * @var array
+ */
+ protected $hidden = [
+ 'password',
+ ];
+}
diff --git a/artisan b/artisan
new file mode 100644
index 0000000..6a9d095
--- /dev/null
+++ b/artisan
@@ -0,0 +1,35 @@
+#!/usr/bin/env php
+<?php
+
+use Symfony\Component\Console\Input\ArgvInput;
+use Symfony\Component\Console\Output\ConsoleOutput;
+
+/*
+|--------------------------------------------------------------------------
+| Create The Application
+|--------------------------------------------------------------------------
+|
+| First we need to get an application instance. This creates an instance
+| of the application / container and bootstraps the application so it
+| is ready to receive HTTP / Console requests from the environment.
+|
+*/
+
+$app = require __DIR__.'/bootstrap/app.php';
+
+/*
+|--------------------------------------------------------------------------
+| Run The Artisan Application
+|--------------------------------------------------------------------------
+|
+| When we run the console application, the current CLI command will be
+| executed in this console and the response sent back to a terminal
+| or another output device for the developers. Here goes nothing!
+|
+*/
+
+$kernel = $app->make(
+ 'Illuminate\Contracts\Console\Kernel'
+);
+
+exit($kernel->handle(new ArgvInput, new ConsoleOutput));
diff --git a/bootstrap/app.php b/bootstrap/app.php
new file mode 100644
index 0000000..5487cb5
--- /dev/null
+++ b/bootstrap/app.php
@@ -0,0 +1,100 @@
+<?php
+
+require_once __DIR__.'/../vendor/autoload.php';
+
+try {
+ (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->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
+);
+
+/*
+|--------------------------------------------------------------------------
+| 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([
+// 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);
+
+/*
+|--------------------------------------------------------------------------
+| 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;
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..6de4efb
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,27 @@
+{
+ "name": "laravel/lumen",
+ "description": "The Laravel Lumen Framework.",
+ "keywords": ["framework", "laravel", "lumen"],
+ "license": "MIT",
+ "type": "project",
+ "require": {
+ "php": ">=5.5.9",
+ "laravel/lumen-framework": "5.2.*",
+ "vlucas/phpdotenv": "~2.2"
+ },
+ "require-dev": {
+ "fzaninotto/faker": "~1.4",
+ "phpunit/phpunit": "~4.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "App\\": "app/"
+ }
+ },
+ "autoload-dev": {
+ "classmap": [
+ "tests/",
+ "database/"
+ ]
+ }
+}
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
new file mode 100644
index 0000000..b795b09
--- /dev/null
+++ b/database/factories/ModelFactory.php
@@ -0,0 +1,19 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Model Factories
+|--------------------------------------------------------------------------
+|
+| Here you may define all of your model factories. Model factories give
+| you a convenient way to create models for testing and seeding your
+| database. Just tell the factory how a default model should look.
+|
+*/
+
+$factory->define(App\User::class, function ($faker) {
+ return [
+ 'name' => $faker->name,
+ 'email' => $faker->email,
+ ];
+});
diff --git a/database/migrations/.gitkeep b/database/migrations/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/database/migrations/.gitkeep
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
new file mode 100644
index 0000000..603fab6
--- /dev/null
+++ b/database/seeds/DatabaseSeeder.php
@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class DatabaseSeeder extends Seeder
+{
+ /**
+ * Run the database seeds.
+ *
+ * @return void
+ */
+ public function run()
+ {
+ // $this->call('UserTableSeeder');
+ }
+}
diff --git a/phpunit.xml b/phpunit.xml
new file mode 100644
index 0000000..77c29fe
--- /dev/null
+++ b/phpunit.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ bootstrap="bootstrap/app.php"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="false">
+ <testsuites>
+ <testsuite name="Application Test Suite">
+ <directory>./tests/</directory>
+ </testsuite>
+ </testsuites>
+ <filter>
+ <whitelist>
+ <directory suffix=".php">app/</directory>
+ </whitelist>
+ </filter>
+ <php>
+ <env name="APP_ENV" value="testing"/>
+ <env name="CACHE_DRIVER" value="array"/>
+ </php>
+</phpunit>
diff --git a/public/.htaccess b/public/.htaccess
new file mode 100644
index 0000000..8eb2dd0
--- /dev/null
+++ b/public/.htaccess
@@ -0,0 +1,16 @@
+<IfModule mod_rewrite.c>
+ <IfModule mod_negotiation.c>
+ Options -MultiViews
+ </IfModule>
+
+ RewriteEngine On
+
+ # Redirect Trailing Slashes If Not A Folder...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^(.*)/$ /$1 [L,R=301]
+
+ # Handle Front Controller...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+</IfModule>
diff --git a/public/index.php b/public/index.php
new file mode 100644
index 0000000..04aa086
--- /dev/null
+++ b/public/index.php
@@ -0,0 +1,28 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Create The Application
+|--------------------------------------------------------------------------
+|
+| First we need to get an application instance. This creates an instance
+| of the application / container and bootstraps the application so it
+| is ready to receive HTTP / Console requests from the environment.
+|
+*/
+
+$app = require __DIR__.'/../bootstrap/app.php';
+
+/*
+|--------------------------------------------------------------------------
+| Run The Application
+|--------------------------------------------------------------------------
+|
+| Once we have the application, we can handle the incoming request
+| through the kernel, and send the associated response back to
+| the client's browser allowing them to enjoy the creative
+| and wonderful application we have prepared for them.
+|
+*/
+
+$app->run();
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..9605e5f
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,21 @@
+## Lumen PHP Framework
+
+[![Build Status](https://travis-ci.org/laravel/lumen-framework.svg)](https://travis-ci.org/laravel/lumen-framework)
+[![Total Downloads](https://poser.pugx.org/laravel/lumen-framework/d/total.svg)](https://packagist.org/packages/laravel/lumen-framework)
+[![Latest Stable Version](https://poser.pugx.org/laravel/lumen-framework/v/stable.svg)](https://packagist.org/packages/laravel/lumen-framework)
+[![Latest Unstable Version](https://poser.pugx.org/laravel/lumen-framework/v/unstable.svg)](https://packagist.org/packages/laravel/lumen-framework)
+[![License](https://poser.pugx.org/laravel/lumen-framework/license.svg)](https://packagist.org/packages/laravel/lumen-framework)
+
+Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching.
+
+## Official Documentation
+
+Documentation for the framework can be found on the [Lumen website](http://lumen.laravel.com/docs).
+
+## Security Vulnerabilities
+
+If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed.
+
+### License
+
+The Lumen framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
diff --git a/resources/views/.gitkeep b/resources/views/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/resources/views/.gitkeep
diff --git a/storage/app/.gitignore b/storage/app/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/storage/app/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/storage/framework/views/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/storage/logs/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php
new file mode 100644
index 0000000..2b206c6
--- /dev/null
+++ b/tests/ExampleTest.php
@@ -0,0 +1,20 @@
+<?php
+
+use Laravel\Lumen\Testing\DatabaseTransactions;
+
+class ExampleTest extends TestCase
+{
+ /**
+ * A basic test example.
+ *
+ * @return void
+ */
+ public function testExample()
+ {
+ $this->get('/');
+
+ $this->assertEquals(
+ $this->response->getContent(), $this->app->version()
+ );
+ }
+}
diff --git a/tests/TestCase.php b/tests/TestCase.php
new file mode 100644
index 0000000..651d9cb
--- /dev/null
+++ b/tests/TestCase.php
@@ -0,0 +1,14 @@
+<?php
+
+class TestCase extends Laravel\Lumen\Testing\TestCase
+{
+ /**
+ * Creates the application.
+ *
+ * @return \Laravel\Lumen\Application
+ */
+ public function createApplication()
+ {
+ return require __DIR__.'/../bootstrap/app.php';
+ }
+}