From a2357435e17f51fbff68bd30ff25fa57f0b4f6bf Mon Sep 17 00:00:00 2001 From: Hosting Admin User Date: Mon, 20 Jun 2016 23:35:59 +1000 Subject: [PATCH 1/8] Added Laravel 5.2 Framework --- .env.example | 27 + .gitattributes | 3 + .gitignore | 6 + app/Console/Commands/Inspire.php | 33 + app/Console/Kernel.php | 30 + app/Events/Event.php | 8 + app/Exceptions/Handler.php | 50 + app/Http/Controllers/Auth/AuthController.php | 72 + .../Controllers/Auth/PasswordController.php | 32 + app/Http/Controllers/Controller.php | 14 + app/Http/Kernel.php | 53 + app/Http/Middleware/Authenticate.php | 30 + app/Http/Middleware/EncryptCookies.php | 17 + .../Middleware/RedirectIfAuthenticated.php | 26 + app/Http/Middleware/VerifyCsrfToken.php | 17 + app/Http/Requests/Request.php | 10 + app/Http/routes.php | 16 + app/Jobs/Job.php | 21 + app/Listeners/.gitkeep | 1 + app/Policies/.gitkeep | 1 + app/Providers/AppServiceProvider.php | 28 + app/Providers/AuthServiceProvider.php | 31 + app/Providers/EventServiceProvider.php | 33 + app/Providers/RouteServiceProvider.php | 61 + app/User.php | 26 + artisan | 51 + bootstrap/app.php | 55 + bootstrap/autoload.php | 34 + bootstrap/cache/.gitignore | 2 + composer.json | 50 + composer.lock | 3163 +++++++++++++++++ config/app.php | 209 ++ config/auth.php | 107 + config/broadcasting.php | 54 + config/cache.php | 83 + config/compile.php | 35 + config/database.php | 120 + config/filesystems.php | 67 + config/mail.php | 112 + config/queue.php | 85 + config/services.php | 42 + config/session.php | 166 + config/view.php | 33 + database/.gitignore | 1 + database/factories/ModelFactory.php | 21 + database/migrations/.gitkeep | 1 + .../2014_10_12_000000_create_users_table.php | 34 + ...12_100000_create_password_resets_table.php | 31 + database/seeds/.gitkeep | 1 + database/seeds/DatabaseSeeder.php | 16 + gulpfile.js | 16 + package.json | 12 + phpunit.xml | 30 + public/.htaccess | 20 + public/favicon.ico | 0 public/index.php | 58 + public/robots.txt | 2 + public/web.config | 23 + readme.md | 27 + resources/assets/sass/app.scss | 2 + resources/lang/en/auth.php | 19 + resources/lang/en/pagination.php | 19 + resources/lang/en/passwords.php | 22 + resources/lang/en/validation.php | 114 + resources/views/errors/503.blade.php | 47 + resources/views/vendor/.gitkeep | 1 + resources/views/welcome.blade.php | 45 + server.php | 21 + storage/app/.gitignore | 3 + storage/app/public/.gitignore | 2 + storage/framework/.gitignore | 8 + storage/framework/cache/.gitignore | 2 + storage/framework/sessions/.gitignore | 2 + storage/framework/views/.gitignore | 2 + storage/logs/.gitignore | 2 + tests/ExampleTest.php | 19 + tests/TestCase.php | 25 + 77 files changed, 5762 insertions(+) create mode 100644 .env.example create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 app/Console/Commands/Inspire.php create mode 100644 app/Console/Kernel.php create mode 100644 app/Events/Event.php create mode 100644 app/Exceptions/Handler.php create mode 100644 app/Http/Controllers/Auth/AuthController.php create mode 100644 app/Http/Controllers/Auth/PasswordController.php create mode 100644 app/Http/Controllers/Controller.php create mode 100644 app/Http/Kernel.php create mode 100644 app/Http/Middleware/Authenticate.php create mode 100644 app/Http/Middleware/EncryptCookies.php create mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php create mode 100644 app/Http/Middleware/VerifyCsrfToken.php create mode 100644 app/Http/Requests/Request.php create mode 100644 app/Http/routes.php create mode 100644 app/Jobs/Job.php create mode 100644 app/Listeners/.gitkeep create mode 100644 app/Policies/.gitkeep create mode 100644 app/Providers/AppServiceProvider.php create mode 100644 app/Providers/AuthServiceProvider.php create mode 100644 app/Providers/EventServiceProvider.php create mode 100644 app/Providers/RouteServiceProvider.php create mode 100644 app/User.php create mode 100644 artisan create mode 100644 bootstrap/app.php create mode 100644 bootstrap/autoload.php create mode 100644 bootstrap/cache/.gitignore create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 config/app.php create mode 100644 config/auth.php create mode 100644 config/broadcasting.php create mode 100644 config/cache.php create mode 100644 config/compile.php create mode 100644 config/database.php create mode 100644 config/filesystems.php create mode 100644 config/mail.php create mode 100644 config/queue.php create mode 100644 config/services.php create mode 100644 config/session.php create mode 100644 config/view.php create mode 100644 database/.gitignore create mode 100644 database/factories/ModelFactory.php create mode 100644 database/migrations/.gitkeep create mode 100644 database/migrations/2014_10_12_000000_create_users_table.php create mode 100644 database/migrations/2014_10_12_100000_create_password_resets_table.php create mode 100644 database/seeds/.gitkeep create mode 100644 database/seeds/DatabaseSeeder.php create mode 100644 gulpfile.js create mode 100644 package.json create mode 100644 phpunit.xml create mode 100644 public/.htaccess create mode 100644 public/favicon.ico create mode 100644 public/index.php create mode 100644 public/robots.txt create mode 100644 public/web.config create mode 100644 readme.md create mode 100644 resources/assets/sass/app.scss create mode 100644 resources/lang/en/auth.php create mode 100644 resources/lang/en/pagination.php create mode 100644 resources/lang/en/passwords.php create mode 100644 resources/lang/en/validation.php create mode 100644 resources/views/errors/503.blade.php create mode 100644 resources/views/vendor/.gitkeep create mode 100644 resources/views/welcome.blade.php create mode 100644 server.php create mode 100644 storage/app/.gitignore create mode 100644 storage/app/public/.gitignore create mode 100644 storage/framework/.gitignore create mode 100644 storage/framework/cache/.gitignore create mode 100644 storage/framework/sessions/.gitignore create mode 100644 storage/framework/views/.gitignore create mode 100644 storage/logs/.gitignore create mode 100644 tests/ExampleTest.php create mode 100644 tests/TestCase.php diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..67a51b4 --- /dev/null +++ b/.env.example @@ -0,0 +1,27 @@ +APP_ENV=local +APP_KEY=SomeRandomString +APP_DEBUG=true +APP_LOG_LEVEL=debug +APP_URL=http://localhost + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=homestead +DB_USERNAME=homestead +DB_PASSWORD=secret + +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +MAIL_HOST=mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..a8763f8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto +*.css linguist-vendored +*.scss linguist-vendored diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b3af3f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/vendor +/node_modules +/public/storage +Homestead.yaml +Homestead.json +.env diff --git a/app/Console/Commands/Inspire.php b/app/Console/Commands/Inspire.php new file mode 100644 index 0000000..db9ab85 --- /dev/null +++ b/app/Console/Commands/Inspire.php @@ -0,0 +1,33 @@ +comment(PHP_EOL.Inspiring::quote().PHP_EOL); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php new file mode 100644 index 0000000..71c519d --- /dev/null +++ b/app/Console/Kernel.php @@ -0,0 +1,30 @@ +command('inspire') + // ->hourly(); + } +} diff --git a/app/Events/Event.php b/app/Events/Event.php new file mode 100644 index 0000000..ba2f888 --- /dev/null +++ b/app/Events/Event.php @@ -0,0 +1,8 @@ +middleware($this->guestMiddleware(), ['except' => 'logout']); + } + + /** + * Get a validator for an incoming registration request. + * + * @param array $data + * @return \Illuminate\Contracts\Validation\Validator + */ + protected function validator(array $data) + { + return Validator::make($data, [ + 'name' => 'required|max:255', + 'email' => 'required|email|max:255|unique:users', + 'password' => 'required|min:6|confirmed', + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return User + */ + protected function create(array $data) + { + return User::create([ + 'name' => $data['name'], + 'email' => $data['email'], + 'password' => bcrypt($data['password']), + ]); + } +} diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php new file mode 100644 index 0000000..66f7736 --- /dev/null +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -0,0 +1,32 @@ +middleware($this->guestMiddleware()); + } +} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php new file mode 100644 index 0000000..d492e0b --- /dev/null +++ b/app/Http/Controllers/Controller.php @@ -0,0 +1,14 @@ + [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + ], + + 'api' => [ + 'throttle:60,1', + ], + ]; + + /** + * The application's route middleware. + * + * These middleware may be assigned to groups or used individually. + * + * @var array + */ + protected $routeMiddleware = [ + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + ]; +} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php new file mode 100644 index 0000000..67abcae --- /dev/null +++ b/app/Http/Middleware/Authenticate.php @@ -0,0 +1,30 @@ +guest()) { + if ($request->ajax() || $request->wantsJson()) { + return response('Unauthorized.', 401); + } else { + return redirect()->guest('login'); + } + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php new file mode 100644 index 0000000..3aa15f8 --- /dev/null +++ b/app/Http/Middleware/EncryptCookies.php @@ -0,0 +1,17 @@ +check()) { + return redirect('/'); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php new file mode 100644 index 0000000..a2c3541 --- /dev/null +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -0,0 +1,17 @@ + 'App\Policies\ModelPolicy', + ]; + + /** + * Register any application authentication / authorization services. + * + * @param \Illuminate\Contracts\Auth\Access\Gate $gate + * @return void + */ + public function boot(GateContract $gate) + { + $this->registerPolicies($gate); + + // + } +} diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php new file mode 100644 index 0000000..58ce962 --- /dev/null +++ b/app/Providers/EventServiceProvider.php @@ -0,0 +1,33 @@ + [ + 'App\Listeners\EventListener', + ], + ]; + + /** + * Register any other events for your application. + * + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return void + */ + public function boot(DispatcherContract $events) + { + parent::boot($events); + + // + } +} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..bde0881 --- /dev/null +++ b/app/Providers/RouteServiceProvider.php @@ -0,0 +1,61 @@ +mapWebRoutes($router); + + // + } + + /** + * Define the "web" routes for the application. + * + * These routes all receive session state, CSRF protection, etc. + * + * @param \Illuminate\Routing\Router $router + * @return void + */ + protected function mapWebRoutes(Router $router) + { + $router->group([ + 'namespace' => $this->namespace, 'middleware' => 'web', + ], function ($router) { + require app_path('Http/routes.php'); + }); + } +} diff --git a/app/User.php b/app/User.php new file mode 100644 index 0000000..75741ae --- /dev/null +++ b/app/User.php @@ -0,0 +1,26 @@ +make(Illuminate\Contracts\Console\Kernel::class); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running. We will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$kernel->terminate($input, $status); + +exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php new file mode 100644 index 0000000..f2801ad --- /dev/null +++ b/bootstrap/app.php @@ -0,0 +1,55 @@ +singleton( + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class +); + +/* +|-------------------------------------------------------------------------- +| Return The Application +|-------------------------------------------------------------------------- +| +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. +| +*/ + +return $app; diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php new file mode 100644 index 0000000..3830137 --- /dev/null +++ b/bootstrap/autoload.php @@ -0,0 +1,34 @@ +=5.5.9", + "laravel/framework": "5.2.*" + }, + "require-dev": { + "fzaninotto/faker": "~1.4", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "~4.0", + "symfony/css-selector": "2.8.*|3.0.*", + "symfony/dom-crawler": "2.8.*|3.0.*" + }, + "autoload": { + "classmap": [ + "database" + ], + "psr-4": { + "App\\": "app/" + } + }, + "autoload-dev": { + "classmap": [ + "tests/TestCase.php" + ] + }, + "scripts": { + "post-root-package-install": [ + "php -r \"copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "php artisan key:generate" + ], + "post-install-cmd": [ + "Illuminate\\Foundation\\ComposerScripts::postInstall", + "php artisan optimize" + ], + "post-update-cmd": [ + "Illuminate\\Foundation\\ComposerScripts::postUpdate", + "php artisan optimize" + ] + }, + "config": { + "preferred-install": "dist" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..f777581 --- /dev/null +++ b/composer.lock @@ -0,0 +1,3163 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "c284a9c122da36c99a8b6597bdce7aa6", + "content-hash": "8b1485987e7c5949da82435d403e52e8", + "packages": [ + { + "name": "classpreloader/classpreloader", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/ClassPreloader/ClassPreloader.git", + "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.0|^2.0", + "php": ">=5.5.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "ClassPreloader\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" + } + ], + "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", + "keywords": [ + "autoload", + "class", + "preload" + ], + "time": "2015-11-09 22:51:51" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "type": "project", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2014-10-24 07:27:01" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2015-11-06 14:35:42" + }, + { + "name": "jakub-onderka/php-console-color", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleColor": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com", + "homepage": "http://www.acci.cz" + } + ], + "time": "2014-04-08 15:00:19" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "shasum": "" + }, + "require": { + "jakub-onderka/php-console-color": "~0.1", + "php": ">=5.3.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleHighlighter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "time": "2015-04-20 18:58:01" + }, + { + "name": "jeremeamia/SuperClosure", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/jeremeamia/super_closure.git", + "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/29a88be2a4846d27c1613aed0c9071dfad7b5938", + "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.2|^2.0", + "php": ">=5.4", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "SuperClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia", + "role": "Developer" + } + ], + "description": "Serialize Closure objects, including their context and binding", + "homepage": "https://github.com/jeremeamia/super_closure", + "keywords": [ + "closure", + "function", + "lambda", + "parser", + "serializable", + "serialize", + "tokenizer" + ], + "time": "2015-12-05 17:17:57" + }, + { + "name": "laravel/framework", + "version": "v5.2.39", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/c2a77050269b4e03bd9a735a9f24e573a7598b8a", + "reference": "c2a77050269b4e03bd9a735a9f24e573a7598b8a", + "shasum": "" + }, + "require": { + "classpreloader/classpreloader": "~3.0", + "doctrine/inflector": "~1.0", + "ext-mbstring": "*", + "ext-openssl": "*", + "jeremeamia/superclosure": "~2.2", + "league/flysystem": "~1.0", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nesbot/carbon": "~1.20", + "paragonie/random_compat": "~1.4", + "php": ">=5.5.9", + "psy/psysh": "0.7.*", + "swiftmailer/swiftmailer": "~5.1", + "symfony/console": "2.8.*|3.0.*", + "symfony/debug": "2.8.*|3.0.*", + "symfony/finder": "2.8.*|3.0.*", + "symfony/http-foundation": "2.8.*|3.0.*", + "symfony/http-kernel": "2.8.*|3.0.*", + "symfony/polyfill-php56": "~1.0", + "symfony/process": "2.8.*|3.0.*", + "symfony/routing": "2.8.*|3.0.*", + "symfony/translation": "2.8.*|3.0.*", + "symfony/var-dumper": "2.8.*|3.0.*", + "vlucas/phpdotenv": "~2.2" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "mockery/mockery": "~0.9.4", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~4.1", + "predis/predis": "~1.0", + "symfony/css-selector": "2.8.*|3.0.*", + "symfony/dom-crawler": "2.8.*|3.0.*" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/Illuminate/Queue/IlluminateQueueClosure.php" + ], + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "http://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "time": "2016-06-17 19:25:12" + }, + { + "name": "league/flysystem", + "version": "1.0.24", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "9aca859a303fdca30370f42b8c611d9cf0dedf4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9aca859a303fdca30370f42b8c611d9cf0dedf4b", + "reference": "9aca859a303fdca30370f42b8c611d9cf0dedf4b", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "ext-fileinfo": "*", + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^2.2", + "phpunit/phpunit": "~4.8 || ~5.0" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-copy": "Allows you to use Copy.com storage", + "league/flysystem-dropbox": "Allows you to use Dropbox storage", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2016-06-03 19:11:39" + }, + { + "name": "monolog/monolog", + "version": "1.19.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "raven/raven": "^0.13", + "ruflin/elastica": ">=0.90 <3.0", + "swiftmailer/swiftmailer": "~5.3" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "raven/raven": "Allow sending log messages to a Sentry server", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2016-04-12 18:29:35" + }, + { + "name": "mtdowling/cron-expression", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/mtdowling/cron-expression.git", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Cron": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "time": "2016-01-26 21:23:30" + }, + { + "name": "nesbot/carbon", + "version": "1.21.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/translation": "~2.6|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2015-11-04 20:07:17" + }, + { + "name": "nikic/php-parser", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/47b254ea51f1d6d5dc04b9b299e88346bf2369e3", + "reference": "47b254ea51f1d6d5dc04b9b299e88346bf2369e3", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2016-04-19 13:41:41" + }, + { + "name": "paragonie/random_compat", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2016-03-18 20:34:03" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "psy/psysh", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e64e10b20f8d229cac76399e1f3edddb57a0f280", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "jakub-onderka/php-console-highlighter": "0.3.*", + "nikic/php-parser": "^1.2.1|~2.0", + "php": ">=5.3.9", + "symfony/console": "~2.3.10|^2.4.2|~3.0", + "symfony/var-dumper": "~2.7|~3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "~1.5", + "phpunit/phpunit": "~3.7|~4.0|~5.0", + "squizlabs/php_codesniffer": "~2.0", + "symfony/finder": "~2.1|~3.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psy/functions.php" + ], + "psr-4": { + "Psy\\": "src/Psy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2016-03-09 05:03:14" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.2", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "d8db871a54619458a805229a057ea2af33c753e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/d8db871a54619458a805229a057ea2af33c753e8", + "reference": "d8db871a54619458a805229a057ea2af33c753e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1,<0.9.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2016-05-01 08:45:47" + }, + { + "name": "symfony/console", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "382fc9ed852edabd6133e34f8549d7a7d99db115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/382fc9ed852edabd6133e34f8549d7a7d99db115", + "reference": "382fc9ed852edabd6133e34f8549d7a7d99db115", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 15:08:35" + }, + { + "name": "symfony/debug", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "e67e1552dd7313df1cf6535cb606751899e0e727" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/e67e1552dd7313df1cf6535cb606751899e0e727", + "reference": "e67e1552dd7313df1cf6535cb606751899e0e727", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 15:08:35" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "f5b7563f67779c6d3d5370e23448e707c858df3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f5b7563f67779c6d3d5370e23448e707c858df3e", + "reference": "f5b7563f67779c6d3d5370e23448e707c858df3e", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:42:41" + }, + { + "name": "symfony/finder", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "39e5f3d533d07b5416b9d7aad53a27f939d4f811" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/39e5f3d533d07b5416b9d7aad53a27f939d4f811", + "reference": "39e5f3d533d07b5416b9d7aad53a27f939d4f811", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2016-05-13 18:03:36" + }, + { + "name": "symfony/http-foundation", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d268a643884f85e91d6ba11ca68de96833f3f6e5", + "reference": "d268a643884f85e91d6ba11ca68de96833f3f6e5", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:33:26" + }, + { + "name": "symfony/http-kernel", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", + "reference": "97cc1c15e3406e7a2adf14ad6b0e41a04d4a6fc4", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "symfony/browser-kit": "~2.8|~3.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~2.8|~3.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 16:52:35" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "3edf57a8fbf9a927533344cef65ad7e1cf31030a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/3edf57a8fbf9a927533344cef65ad7e1cf31030a", + "reference": "3edf57a8fbf9a927533344cef65ad7e1cf31030a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "ef830ce3d218e622b221d6bfad42c751d974bf99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ef830ce3d218e622b221d6bfad42c751d974bf99", + "reference": "ef830ce3d218e622b221d6bfad42c751d974bf99", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/process", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd", + "reference": "bf6e2d1fa8b93fdd7cca6b684c0ea213cf0255dd", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:33:26" + }, + { + "name": "symfony/routing", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/c780454838a1131adc756d737a4b4cc1d18f8c64", + "reference": "c780454838a1131adc756d737a4b4cc1d18f8c64", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2016-05-30 06:58:27" + }, + { + "name": "symfony/translation", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", + "reference": "2b0aacaa613c0ec1ad8046f972d8abdcb19c1db7", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:33:26" + }, + { + "name": "symfony/var-dumper", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "d8bb851da153d97abe7c2b71a65dee19f324bcf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d8bb851da153d97abe7c2b71a65dee19f324bcf7", + "reference": "d8bb851da153d97abe7c2b71a65dee19f324bcf7", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2016-05-24 10:03:10" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/9ca5644c536654e9509b9d257f53c58630eb2a6a", + "reference": "9ca5644c536654e9509b9d257f53c58630eb2a6a", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause-Attribution" + ], + "authors": [ + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "http://www.vancelucas.com" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "time": "2016-06-14 14:14:52" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "fzaninotto/faker", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "extra": { + "branch-alias": [] + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2016-04-29 12:21:54" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "satooshi/php-coveralls": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "hamcrest" + ], + "files": [ + "hamcrest/Hamcrest.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2015-05-11 14:41:42" + }, + { + "name": "mockery/mockery", + "version": "0.9.5", + "source": { + "type": "git", + "url": "https://github.com/padraic/mockery.git", + "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2", + "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~1.1", + "lib-pcre": ">=7.0", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2016-05-22 21:52:33" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-06-10 09:48:41" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-06-10 07:14:17" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-06-07 08:13:47" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06 15:47:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12 18:03:57" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.26", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc1d8cd5b5de11625979125c5639347896ac2c74", + "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2016-05-17 03:09:28" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02 06:51:40" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-05-17 03:18:57" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17 09:04:28" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11 19:50:13" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" + }, + { + "name": "symfony/css-selector", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "e8a66c51bf65f188c02f8120c0748b2291d3a2d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e8a66c51bf65f188c02f8120c0748b2291d3a2d0", + "reference": "e8a66c51bf65f188c02f8120c0748b2291d3a2d0", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2016-06-06 11:33:26" + }, + { + "name": "symfony/dom-crawler", + "version": "v3.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "49b588841225b205700e5122fa01911cabada857" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/49b588841225b205700e5122fa01911cabada857", + "reference": "49b588841225b205700e5122fa01911cabada857", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2016-04-12 18:09:53" + }, + { + "name": "symfony/yaml", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-06-14 11:18:07" + }, + { + "name": "webmozart/assert", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2015-08-24 13:29:44" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.5.9" + }, + "platform-dev": [] +} diff --git a/config/app.php b/config/app.php new file mode 100644 index 0000000..7c1987c --- /dev/null +++ b/config/app.php @@ -0,0 +1,209 @@ + env('APP_ENV', 'production'), + + /* + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | + */ + + 'debug' => env('APP_DEBUG', false), + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | + */ + + 'url' => env('APP_URL', 'http://localhost'), + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | + */ + + 'timezone' => 'UTC', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | + */ + + 'locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | + */ + + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | + */ + + 'key' => env('APP_KEY'), + + 'cipher' => 'AES-256-CBC', + + /* + |-------------------------------------------------------------------------- + | Logging Configuration + |-------------------------------------------------------------------------- + | + | Here you may configure the log settings for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Settings: "single", "daily", "syslog", "errorlog" + | + */ + + 'log' => env('APP_LOG', 'single'), + + 'log_level' => env('APP_LOG_LEVEL', 'debug'), + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => [ + + /* + * Laravel Framework Service Providers... + */ + Illuminate\Auth\AuthServiceProvider::class, + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Database\DatabaseServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Filesystem\FilesystemServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Mail\MailServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, + + /* + * Application Service Providers... + */ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + App\Providers\EventServiceProvider::class, + App\Providers\RouteServiceProvider::class, + + ], + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => [ + + 'App' => Illuminate\Support\Facades\App::class, + 'Artisan' => Illuminate\Support\Facades\Artisan::class, + 'Auth' => Illuminate\Support\Facades\Auth::class, + 'Blade' => Illuminate\Support\Facades\Blade::class, + 'Cache' => Illuminate\Support\Facades\Cache::class, + 'Config' => Illuminate\Support\Facades\Config::class, + 'Cookie' => Illuminate\Support\Facades\Cookie::class, + 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'DB' => Illuminate\Support\Facades\DB::class, + 'Eloquent' => Illuminate\Database\Eloquent\Model::class, + 'Event' => Illuminate\Support\Facades\Event::class, + 'File' => Illuminate\Support\Facades\File::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, + 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Lang' => Illuminate\Support\Facades\Lang::class, + 'Log' => Illuminate\Support\Facades\Log::class, + 'Mail' => Illuminate\Support\Facades\Mail::class, + 'Password' => Illuminate\Support\Facades\Password::class, + 'Queue' => Illuminate\Support\Facades\Queue::class, + 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'Redis' => Illuminate\Support\Facades\Redis::class, + 'Request' => Illuminate\Support\Facades\Request::class, + 'Response' => Illuminate\Support\Facades\Response::class, + 'Route' => Illuminate\Support\Facades\Route::class, + 'Schema' => Illuminate\Support\Facades\Schema::class, + 'Session' => Illuminate\Support\Facades\Session::class, + 'Storage' => Illuminate\Support\Facades\Storage::class, + 'URL' => Illuminate\Support\Facades\URL::class, + 'Validator' => Illuminate\Support\Facades\Validator::class, + 'View' => Illuminate\Support\Facades\View::class, + + ], + +]; diff --git a/config/auth.php b/config/auth.php new file mode 100644 index 0000000..3fa7f49 --- /dev/null +++ b/config/auth.php @@ -0,0 +1,107 @@ + [ + 'guard' => 'web', + 'passwords' => 'users', + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session", "token" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + + 'api' => [ + 'driver' => 'token', + 'provider' => 'users', + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => App\User::class, + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | Here you may set the options for resetting passwords including the view + | that is your password reset e-mail. You may also set the name of the + | table that maintains all of the reset tokens for your application. + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that the reset token should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'email' => 'auth.emails.password', + 'table' => 'password_resets', + 'expire' => 60, + ], + ], + +]; diff --git a/config/broadcasting.php b/config/broadcasting.php new file mode 100644 index 0000000..bf8b2df --- /dev/null +++ b/config/broadcasting.php @@ -0,0 +1,54 @@ + env('BROADCAST_DRIVER', 'pusher'), + + /* + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ + + 'connections' => [ + + 'pusher' => [ + 'driver' => 'pusher', + 'key' => env('PUSHER_KEY'), + 'secret' => env('PUSHER_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), + 'options' => [ + // + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + 'log' => [ + 'driver' => 'log', + ], + + ], + +]; diff --git a/config/cache.php b/config/cache.php new file mode 100644 index 0000000..6b8ac91 --- /dev/null +++ b/config/cache.php @@ -0,0 +1,83 @@ + env('CACHE_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + */ + + 'stores' => [ + + 'apc' => [ + 'driver' => 'apc', + ], + + 'array' => [ + 'driver' => 'array', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'cache', + 'connection' => null, + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing a RAM based store such as APC or Memcached, there might + | be other applications utilizing the same cache. So, we'll specify a + | value to get prefixed to all our keys so we can avoid collisions. + | + */ + + 'prefix' => 'laravel', + +]; diff --git a/config/compile.php b/config/compile.php new file mode 100644 index 0000000..04807ea --- /dev/null +++ b/config/compile.php @@ -0,0 +1,35 @@ + [ + // + ], + + /* + |-------------------------------------------------------------------------- + | Compiled File Providers + |-------------------------------------------------------------------------- + | + | Here you may list service providers which define a "compiles" function + | that returns additional files that should be compiled, providing an + | easy way to get common files from any packages you are utilizing. + | + */ + + 'providers' => [ + // + ], + +]; diff --git a/config/database.php b/config/database.php new file mode 100644 index 0000000..8451a62 --- /dev/null +++ b/config/database.php @@ -0,0 +1,120 @@ + PDO::FETCH_CLASS, + + /* + |-------------------------------------------------------------------------- + | Default Database Connection Name + |-------------------------------------------------------------------------- + | + | Here you may specify which of the database connections below you wish + | to use as your default connection for all database work. Of course + | you may use many connections at once using the Database library. + | + */ + + 'default' => env('DB_CONNECTION', 'mysql'), + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | + */ + + 'connections' => [ + + 'sqlite' => [ + 'driver' => 'sqlite', + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', + ], + + 'mysql' => [ + 'driver' => 'mysql', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', + 'strict' => false, + 'engine' => null, + ], + + 'pgsql' => [ + 'driver' => 'pgsql', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ + + 'migrations' => 'migrations', + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer set of commands than a typical key-value systems + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ + + 'redis' => [ + + 'cluster' => false, + + 'default' => [ + 'host' => env('REDIS_HOST', 'localhost'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => env('REDIS_PORT', 6379), + 'database' => 0, + ], + + ], + +]; diff --git a/config/filesystems.php b/config/filesystems.php new file mode 100644 index 0000000..75b5002 --- /dev/null +++ b/config/filesystems.php @@ -0,0 +1,67 @@ + 'local', + + /* + |-------------------------------------------------------------------------- + | Default Cloud Filesystem Disk + |-------------------------------------------------------------------------- + | + | Many applications store files both locally and in the cloud. For this + | reason, you may specify a default "cloud" driver here. This driver + | will be bound as the Cloud disk implementation in the container. + | + */ + + 'cloud' => 's3', + + /* + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been setup for each driver as an example of the required options. + | + */ + + 'disks' => [ + + 'local' => [ + 'driver' => 'local', + 'root' => storage_path('app'), + ], + + 'public' => [ + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'visibility' => 'public', + ], + + 's3' => [ + 'driver' => 's3', + 'key' => 'your-key', + 'secret' => 'your-secret', + 'region' => 'your-region', + 'bucket' => 'your-bucket', + ], + + ], + +]; diff --git a/config/mail.php b/config/mail.php new file mode 100644 index 0000000..a076588 --- /dev/null +++ b/config/mail.php @@ -0,0 +1,112 @@ + env('MAIL_DRIVER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | SMTP Host Address + |-------------------------------------------------------------------------- + | + | Here you may provide the host address of the SMTP server used by your + | applications. A default option is provided that is compatible with + | the Mailgun mail service which will provide reliable deliveries. + | + */ + + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + + /* + |-------------------------------------------------------------------------- + | SMTP Host Port + |-------------------------------------------------------------------------- + | + | This is the SMTP port used by your application to deliver e-mails to + | users of the application. Like the host we have set this value to + | stay compatible with the Mailgun e-mail application by default. + | + */ + + 'port' => env('MAIL_PORT', 587), + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => ['address' => null, 'name' => null], + + /* + |-------------------------------------------------------------------------- + | E-Mail Encryption Protocol + |-------------------------------------------------------------------------- + | + | Here you may specify the encryption protocol that should be used when + | the application send e-mail messages. A sensible default using the + | transport layer security protocol should provide great security. + | + */ + + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + + /* + |-------------------------------------------------------------------------- + | SMTP Server Username + |-------------------------------------------------------------------------- + | + | If your SMTP server requires a username for authentication, you should + | set it here. This will get used to authenticate with your server on + | connection. You may also set the "password" value below this one. + | + */ + + 'username' => env('MAIL_USERNAME'), + + /* + |-------------------------------------------------------------------------- + | SMTP Server Password + |-------------------------------------------------------------------------- + | + | Here you may set the password required by your SMTP server to send out + | messages from your application. This will be given to the server on + | connection so that the application will be able to send messages. + | + */ + + 'password' => env('MAIL_PASSWORD'), + + /* + |-------------------------------------------------------------------------- + | Sendmail System Path + |-------------------------------------------------------------------------- + | + | When using the "sendmail" driver to send e-mails, we will need to know + | the path to where Sendmail lives on this server. A default path has + | been provided here, which will work well on most of your systems. + | + */ + + 'sendmail' => '/usr/sbin/sendmail -bs', + +]; diff --git a/config/queue.php b/config/queue.php new file mode 100644 index 0000000..d0f732a --- /dev/null +++ b/config/queue.php @@ -0,0 +1,85 @@ + env('QUEUE_DRIVER', 'sync'), + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + */ + + 'connections' => [ + + 'sync' => [ + 'driver' => 'sync', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', + 'expire' => 60, + ], + + 'beanstalkd' => [ + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'ttr' => 60, + ], + + 'sqs' => [ + 'driver' => 'sqs', + 'key' => 'your-public-key', + 'secret' => 'your-secret-key', + 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', + 'queue' => 'your-queue-name', + 'region' => 'us-east-1', + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => 'default', + 'expire' => 60, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | + */ + + 'failed' => [ + 'database' => env('DB_CONNECTION', 'mysql'), + 'table' => 'failed_jobs', + ], + +]; diff --git a/config/services.php b/config/services.php new file mode 100644 index 0000000..1581f1d --- /dev/null +++ b/config/services.php @@ -0,0 +1,42 @@ + [ + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), + ], + + 'mandrill' => [ + 'secret' => env('MANDRILL_SECRET'), + ], + + 'ses' => [ + 'key' => env('SES_KEY'), + 'secret' => env('SES_SECRET'), + 'region' => 'us-east-1', + ], + + 'sparkpost' => [ + 'secret' => env('SPARKPOST_SECRET'), + ], + + 'stripe' => [ + 'model' => App\User::class, + 'key' => env('STRIPE_KEY'), + 'secret' => env('STRIPE_SECRET'), + ], + +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..b501055 --- /dev/null +++ b/config/session.php @@ -0,0 +1,166 @@ + env('SESSION_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => 120, + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | + */ + + 'encrypt' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => null, + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => 'laravel_session', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => null, + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you if it can not be done securely. + | + */ + + 'secure' => false, + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + + 'http_only' => true, + +]; diff --git a/config/view.php b/config/view.php new file mode 100644 index 0000000..e193ab6 --- /dev/null +++ b/config/view.php @@ -0,0 +1,33 @@ + [ + realpath(base_path('resources/views')), + ], + + /* + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | + */ + + 'compiled' => realpath(storage_path('framework/views')), + +]; diff --git a/database/.gitignore b/database/.gitignore new file mode 100644 index 0000000..9b1dffd --- /dev/null +++ b/database/.gitignore @@ -0,0 +1 @@ +*.sqlite diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php new file mode 100644 index 0000000..f596d0b --- /dev/null +++ b/database/factories/ModelFactory.php @@ -0,0 +1,21 @@ +define(App\User::class, function (Faker\Generator $faker) { + return [ + 'name' => $faker->name, + 'email' => $faker->safeEmail, + 'password' => bcrypt(str_random(10)), + 'remember_token' => str_random(10), + ]; +}); diff --git a/database/migrations/.gitkeep b/database/migrations/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/database/migrations/.gitkeep @@ -0,0 +1 @@ + diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 0000000..59aa01a --- /dev/null +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,34 @@ +increments('id'); + $table->string('name'); + $table->string('email')->unique(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('users'); + } +} diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 0000000..00057f9 --- /dev/null +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,31 @@ +string('email')->index(); + $table->string('token')->index(); + $table->timestamp('created_at'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('password_resets'); + } +} diff --git a/database/seeds/.gitkeep b/database/seeds/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/database/seeds/.gitkeep @@ -0,0 +1 @@ + diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php new file mode 100644 index 0000000..e119db6 --- /dev/null +++ b/database/seeds/DatabaseSeeder.php @@ -0,0 +1,16 @@ +call(UsersTableSeeder::class); + } +} diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..dc6f1eb --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,16 @@ +var elixir = require('laravel-elixir'); + +/* + |-------------------------------------------------------------------------- + | Elixir Asset Management + |-------------------------------------------------------------------------- + | + | Elixir provides a clean, fluent API for defining some basic Gulp tasks + | for your Laravel application. By default, we are compiling the Sass + | file for our application, as well as publishing vendor resources. + | + */ + +elixir(function(mix) { + mix.sass('app.scss'); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..87481c7 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "private": true, + "scripts": { + "prod": "gulp --production", + "dev": "gulp watch" + }, + "devDependencies": { + "gulp": "^3.9.1", + "laravel-elixir": "^5.0.0", + "bootstrap-sass": "^3.3.0" + } +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..3e884d1 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,30 @@ + + + + + ./tests + + + + + ./app + + ./app/Http/routes.php + + + + + + + + + + diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..903f639 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,20 @@ + + + Options -MultiViews + + + 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] + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..c582053 --- /dev/null +++ b/public/index.php @@ -0,0 +1,58 @@ + + */ + +/* +|-------------------------------------------------------------------------- +| Register The Auto Loader +|-------------------------------------------------------------------------- +| +| Composer provides a convenient, automatically generated class loader for +| our application. We just need to utilize it! We'll simply require it +| into the script here so that we don't have to worry about manual +| loading any of our classes later on. It feels nice to relax. +| +*/ + +require __DIR__.'/../bootstrap/autoload.php'; + +/* +|-------------------------------------------------------------------------- +| Turn On The Lights +|-------------------------------------------------------------------------- +| +| We need to illuminate PHP development, so let us turn on the lights. +| This bootstraps the framework and gets it ready for use, then it +| will load up this application so that we can run it and send +| the responses back to the browser and delight our users. +| +*/ + +$app = require_once __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. +| +*/ + +$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); + +$response = $kernel->handle( + $request = Illuminate\Http\Request::capture() +); + +$response->send(); + +$kernel->terminate($request, $response); diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/public/web.config b/public/web.config new file mode 100644 index 0000000..624c176 --- /dev/null +++ b/public/web.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..7f8816d --- /dev/null +++ b/readme.md @@ -0,0 +1,27 @@ +# Laravel PHP Framework + +[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) +[![Total Downloads](https://poser.pugx.org/laravel/framework/d/total.svg)](https://packagist.org/packages/laravel/framework) +[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework) +[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework) +[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework) + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching. + +Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked. + +## Official Documentation + +Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs). + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). + +## 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 Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss new file mode 100644 index 0000000..bb76e29 --- /dev/null +++ b/resources/assets/sass/app.scss @@ -0,0 +1,2 @@ +// @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; + diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php new file mode 100644 index 0000000..e5506df --- /dev/null +++ b/resources/lang/en/auth.php @@ -0,0 +1,19 @@ + 'These credentials do not match our records.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php new file mode 100644 index 0000000..fcab34b --- /dev/null +++ b/resources/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php new file mode 100644 index 0000000..e5544d2 --- /dev/null +++ b/resources/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Passwords must be at least six characters and match the confirmation.', + 'reset' => 'Your password has been reset!', + 'sent' => 'We have e-mailed your password reset link!', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that e-mail address.", + +]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php new file mode 100644 index 0000000..b720584 --- /dev/null +++ b/resources/lang/en/validation.php @@ -0,0 +1,114 @@ + 'The :attribute must be accepted.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'alpha' => 'The :attribute may only contain letters.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', + 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', + 'between' => [ + 'numeric' => 'The :attribute must be between :min and :max.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'string' => 'The :attribute must be between :min and :max characters.', + 'array' => 'The :attribute must have between :min and :max items.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'date' => 'The :attribute is not a valid date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'The :attribute must be a valid email address.', + 'exists' => 'The selected :attribute is invalid.', + 'filled' => 'The :attribute field is required.', + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'max' => [ + 'numeric' => 'The :attribute may not be greater than :max.', + 'file' => 'The :attribute may not be greater than :max kilobytes.', + 'string' => 'The :attribute may not be greater than :max characters.', + 'array' => 'The :attribute may not have more than :max items.', + ], + 'mimes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'numeric' => 'The :attribute must be at least :min.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'string' => 'The :attribute must be at least :min characters.', + 'array' => 'The :attribute must have at least :min items.', + ], + 'not_in' => 'The selected :attribute is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'present' => 'The :attribute field must be present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values is present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'numeric' => 'The :attribute must be :size.', + 'file' => 'The :attribute must be :size kilobytes.', + 'string' => 'The :attribute must be :size characters.', + 'array' => 'The :attribute must contain :size items.', + ], + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'unique' => 'The :attribute has already been taken.', + 'url' => 'The :attribute format is invalid.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php new file mode 100644 index 0000000..4a41505 --- /dev/null +++ b/resources/views/errors/503.blade.php @@ -0,0 +1,47 @@ + + + + Be right back. + + + + + + +
+
+
Be right back.
+
+
+ + diff --git a/resources/views/vendor/.gitkeep b/resources/views/vendor/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/resources/views/vendor/.gitkeep @@ -0,0 +1 @@ + diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php new file mode 100644 index 0000000..87710ac --- /dev/null +++ b/resources/views/welcome.blade.php @@ -0,0 +1,45 @@ + + + + Laravel + + + + + + +
+
+
Laravel 5
+
+
+ + diff --git a/server.php b/server.php new file mode 100644 index 0000000..f65c7c4 --- /dev/null +++ b/server.php @@ -0,0 +1,21 @@ + + */ + +$uri = urldecode( + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) +); + +// This file allows us to emulate Apache's "mod_rewrite" functionality from the +// built-in PHP web server. This provides a convenient way to test a Laravel +// application without having installed a "real" web server software here. +if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { + return false; +} + +require_once __DIR__.'/public/index.php'; diff --git a/storage/app/.gitignore b/storage/app/.gitignore new file mode 100644 index 0000000..8f4803c --- /dev/null +++ b/storage/app/.gitignore @@ -0,0 +1,3 @@ +* +!public/ +!.gitignore diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/app/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore new file mode 100644 index 0000000..b02b700 --- /dev/null +++ b/storage/framework/.gitignore @@ -0,0 +1,8 @@ +config.php +routes.php +schedule-* +compiled.php +services.json +events.scanned.php +routes.scanned.php +down diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/framework/sessions/.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..7e81d37 --- /dev/null +++ b/tests/ExampleTest.php @@ -0,0 +1,19 @@ +visit('/') + ->see('Laravel 5'); + } +} diff --git a/tests/TestCase.php b/tests/TestCase.php new file mode 100644 index 0000000..8208edc --- /dev/null +++ b/tests/TestCase.php @@ -0,0 +1,25 @@ +make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); + + return $app; + } +} From b1d7cfe6165a9e26b0c43bc2530faf7e97f64499 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 22 Jun 2016 15:49:20 +1000 Subject: [PATCH 2/8] Coverted script import to laravel --- app/Console/Commands/Import.php | 221 ++++++++ app/Console/Kernel.php | 2 +- app/Http/Controllers/PhotoController.php | 31 ++ app/Http/routes.php | 7 + app/Model/Person.php | 9 + app/Model/Photo.php | 135 +++++ app/Model/PhotoPerson.php | 9 + app/Model/PhotoTag.php | 15 + app/Model/Tag.php | 9 + application/classes/Controller/Welcome.php | 10 - application/classes/Model/Album.php | 14 - application/classes/Model/Photo.php | 5 + application/classes/Model/Photo/People.php | 14 - application/classes/Model/Photo/Tag.php | 14 - application/classes/Model/Tags.php | 14 - application/classes/Task/Photo/Import.php | 186 ------- composer.json | 10 +- composer.lock | 502 +++++++++++++++++- config/app.php | 4 +- config/photo.php | 9 + .../2016_06_03_055603_create_photo_table.php | 48 ++ .../2016_06_03_055604_create_people_table.php | 35 ++ ...06_03_055604_create_photo_people_table.php | 36 ++ ...16_06_03_055604_create_photo_tag_table.php | 36 ++ .../2016_06_03_055604_create_tags_table.php | 34 ++ ...add_foreign_keys_to_photo_people_table.php | 37 ++ ...05_add_foreign_keys_to_photo_tag_table.php | 37 ++ .../views/auth/emails/password.blade.php | 1 + resources/views/auth/login.blade.php | 66 +++ .../views/auth/passwords/email.blade.php | 47 ++ .../views/auth/passwords/reset.blade.php | 70 +++ resources/views/auth/register.blade.php | 82 +++ resources/views/common/errors.blade.php | 16 + resources/views/layouts/app.blade.php | 82 +++ resources/views/photo/view.blade.php | 17 + resources/views/welcome.blade.php | 54 +- 36 files changed, 1619 insertions(+), 299 deletions(-) create mode 100644 app/Console/Commands/Import.php create mode 100644 app/Http/Controllers/PhotoController.php create mode 100644 app/Model/Person.php create mode 100644 app/Model/Photo.php create mode 100644 app/Model/PhotoPerson.php create mode 100644 app/Model/PhotoTag.php create mode 100644 app/Model/Tag.php delete mode 100644 application/classes/Controller/Welcome.php delete mode 100644 application/classes/Model/Album.php delete mode 100644 application/classes/Model/Photo/People.php delete mode 100644 application/classes/Model/Photo/Tag.php delete mode 100644 application/classes/Model/Tags.php delete mode 100644 application/classes/Task/Photo/Import.php create mode 100644 config/photo.php create mode 100644 database/migrations/2016_06_03_055603_create_photo_table.php create mode 100644 database/migrations/2016_06_03_055604_create_people_table.php create mode 100644 database/migrations/2016_06_03_055604_create_photo_people_table.php create mode 100644 database/migrations/2016_06_03_055604_create_photo_tag_table.php create mode 100644 database/migrations/2016_06_03_055604_create_tags_table.php create mode 100644 database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_people_table.php create mode 100644 database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_tag_table.php create mode 100644 resources/views/auth/emails/password.blade.php create mode 100644 resources/views/auth/login.blade.php create mode 100644 resources/views/auth/passwords/email.blade.php create mode 100644 resources/views/auth/passwords/reset.blade.php create mode 100644 resources/views/auth/register.blade.php create mode 100644 resources/views/common/errors.blade.php create mode 100644 resources/views/layouts/app.blade.php create mode 100644 resources/views/photo/view.blade.php diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php new file mode 100644 index 0000000..d975afc --- /dev/null +++ b/app/Console/Commands/Import.php @@ -0,0 +1,221 @@ +option('file')) AND is_null($this->option('dir'))) + abort(500,'Missing filename, please use --file= OR --dir='); + + Log::info('Processing: '.($this->option('file') ? $this->option('file') : $this->option('dir'))); + + $files = []; + + if ($this->option('dir')) + { + // Remove our trailing slash from the directory. + $dir = preg_replace('/\/$/','',$this->option('dir')); + + // Exclude . & .. from the path. + $files = array_diff(scandir($dir),array('.','..')); + + // Determine if our dir is releative to where we store data + $dir = preg_replace('/^\//','',str_replace(config('photo.dir'),'',$dir)); + + // Add our path + if ($dir) + array_walk($files,function(&$value,$key,$path='') { + if ($path) { + $value = sprintf('%s/%s',$path,$value); + } + },$dir); + } + elseif ($this->option('file')) + { + $files = array($this->option('file')); + } + + // Show a progress bar + $bar = $this->output->createProgressBar(count($files)); + $bar->setFormat("%current%/%max% [%bar%] %percent:3s%% (%memory%) (%remaining%) "); + + $tags = NULL; + $t = $p = array(); + + // Tags + if ($this->option('tags')) + { + $tags = explode(',',$this->option('tags')); + $t = Tag::whereIn('tag',$tags)->get(); + } + + // People + if ($this->option('people')) + { + $tags = explode(',',$this->option('people')); + $p = Person::whereIn('tag',$tags)->get(); + } + + $c = 0; + foreach ($files as $file) + { + $bar->advance(); + + if (preg_match('/@__thumb/',$file) OR preg_match('/\/._/',$file)) + { + $this->warn(sprintf('Ignoring file [%s]',$file)); + continue; + } + + if (! in_array(strtolower(pathinfo($file,PATHINFO_EXTENSION)),config('photo.import.accepted'))) + { + $this->warn(sprintf('Ignoring [%s]',$file)); + continue; + } + + if ($this->option('verbose')) + $this->info(sprintf('Processing file [%s]',$file)); + + $c++; + + $po = Photo::where('filename',$file)->first(); + + if (is_null($po)) + { + $po = new Photo; + $po->filename = $file; + } + + $po->date_taken = strtotime($po->io('exif:DateTime')); + $po->subsectime = $po->io('exif:SubSecTimeOriginal'); + + $po->signature = $po->io()->getImageSignature(); + + $po->make = $po->io('exif:Make'); + $po->model = $po->io('exif:Model'); + + $po->height = $po->io()->getImageheight(); + $po->width = $po->io()->getImageWidth(); + $po->orientation = $po->io()->getImageOrientation(); + + $po->gps_lat = $po->gps(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLatitude')),$po->io()->getImageProperty('exif:GPSLatitudeRef')); + $po->gps_lon = $po->gps(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLongitude')),$po->io()->getImageProperty('exif:GPSLongitudeRef')); + + try { + $po->thumbnail = exif_thumbnail($po->file_path()); + } catch (Exception $e) { + // @todo Couldnt get the thumbnail, so we should create one. + } + + // If this is a duplicate + $x = $po->list_duplicate()->get(); + if (count($x)) { + $skip = FALSE; + + foreach ($x as $o) { + // We'll only ignore based on the same signature. + if ($po->signature != $o->signature AND ! $po->exists) + continue; + + if ($this->option('ignoredupe')) + { + $skip = TRUE; + $this->warn(sprintf("Ignoring file [%s], it's the same as [%s] with id %s",$po->file_path(),$o->filename,$o->id)); + break; + + } + elseif ($this->option('deletedupe') AND ($po->filename != $o->filename)) + { + $skip = TRUE; + $this->error(sprintf("Deleting file [%s], it's the same as [%s] with id %s and signature [%s]\n",$po->file_path(),$o->filename,$o->id,$po->signature)); + unlink($po->file_path()); + } + } + + if ($skip) + continue; + + $po->duplicate = '1'; + $this->warn(sprintf('Image [%s] marked as a duplicate',$file)); + } + + if ($po->exists) + $this->warn(sprintf('Image [%s] already in DB: %s',$file,$po->id)); + + $po->save(); + + if ($po->wasRecentlyCreated) + $this->info(sprintf('Image [%s] stored in DB: %s',$file,$po->id)); + + // Record our tags + foreach ($t as $o) + if (! (new PhotoTag)->where('tag_id','=',$o->id)->where('photo_id','=',$po->id)->count()) + { + $x = new PhotoTag; + $x->tag_id = $o->id; + $x->photo_id = $po->id; + $x->save(); + } + + // Record our people + foreach ($p as $o) + if (! (new PhotoPerson)->where('people_id','=',$o->id)->where('photo_id','=',$po->id)->count()) + { + $x = new PhotoPerson; + $x->people_id = $o->id; + $x->photo_id = $po->id; + $x->save(); + } + } + + $bar->finish(); + + return $this->info(sprintf('Images processed: %s',$c)); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 71c519d..6ad3780 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel * @var array */ protected $commands = [ - // Commands\Inspire::class, + Commands\Import::class, ]; /** diff --git a/app/Http/Controllers/PhotoController.php b/app/Http/Controllers/PhotoController.php new file mode 100644 index 0000000..687a5e2 --- /dev/null +++ b/app/Http/Controllers/PhotoController.php @@ -0,0 +1,31 @@ +middleware('guest'); + } + + public function info($id) + { + return view('photo.view', ['photo'=> Photo::findOrFail($id)]); + } + + public function thumbnail($id) + { + return (new Response(Photo::findOrFail($id)->thumbnail()))->header('Content-Type','image/jpg'); + } +} diff --git a/app/Http/routes.php b/app/Http/routes.php index 1ad3549..8fa3ec9 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -1,5 +1,7 @@ where('id', '[0-9]+');; +Route::get('/thumbnail/{id}', 'PhotoController@thumbnail')->where('id', '[0-9]+');; diff --git a/app/Model/Person.php b/app/Model/Person.php new file mode 100644 index 0000000..1dc0167 --- /dev/null +++ b/app/Model/Person.php @@ -0,0 +1,9 @@ +180, + 6=>90, + 8=>-90, + ]; + + /** + * Determine the new name for the image + */ + public function file_path($short=FALSE,$new=FALSE) { + $file = $this->filename; + + if ($new) + $file = sprintf('%s.%s',((is_null($this->date_taken) OR ! $this->date_taken) + ? sprintf('UNKNOWN/%07s',$this->file_path_id()) + : sprintf('%s_%03s',date('Y/m/d-His',$this->date_taken),$this->subsectime).($this->subsectime ? '' : sprintf('-%05s',$this->id))),$this->type()); + + return (($short OR preg_match('/^\//',$file)) ? '' : config('photo.dir').DIRECTORY_SEPARATOR).$file; + } + + public function gps(array $coordinate,$hemisphere) { + if (! $coordinate OR ! $hemisphere) + return NULL; + + for ($i=0; $i<3; $i++) { + $part = explode('/', $coordinate[$i]); + + if (count($part) == 1) + $coordinate[$i] = $part[0]; + + elseif (count($part) == 2) + $coordinate[$i] = floatval($part[0])/floatval($part[1]); + + else + $coordinate[$i] = 0; + } + + list($degrees, $minutes, $seconds) = $coordinate; + + $sign = ($hemisphere == 'W' || $hemisphere == 'S') ? -1 : 1; + + return round($sign*($degrees+$minutes/60+$seconds/3600),$degrees > 100 ? 3 : 4); + } + + /** + * Return an Imagick object or attribute + * + */ + public function io($attr=NULL) { + if (is_null($this->_io)) + $this->_io = new \Imagick($this->file_path()); + + return is_null($attr) ? $this->_io : $this->_io->getImageProperty($attr); + } + + /** + * Rotate the image + * + */ + private function rotate(\Imagick $imo) + { + if (array_key_exists($this->orientation,$this->_rotate)) + $imo->rotateImage(new \ImagickPixel('none'),$this->_rotate[$this->orientation]); + + return $imo->getImageBlob(); + } + + /** + * Return the image's thumbnail + * + */ + public function thumbnail($rotate=TRUE) + { + if (! $this->thumbnail) + return NULL; + + if (! $rotate OR ! array_key_exists($this->orientation,$this->_rotate) OR ! extension_loaded('imagick')) + return $this->thumbnail; + + $imo = new \Imagick(); + $imo->readImageBlob($this->thumbnail); + + return $this->rotate($imo); + } + + public function list_duplicate() { + $po = DB::table('photo'); + + if ($this->id) + $po->where('id','!=',$this->id); + + // Ignore photo's pending removal. + $po->where(function($query) { + $query->where('remove','!=',TRUE) + ->orWhere('remove','=',NULL); + }); + + // Where the signature is the same + $po->where(function($query) { + $query->where('signature','=',$this->signature); + + // Or they have the same time taken with the same camera + if ($this->date_taken AND ($this->model OR $this->make)) { + $query->orWhere(function($query) { + $query->where('date_taken','=',$this->date_taken ? $this->date_taken : NULL); + $query->where('subsectime','=',$this->subsectime ? $this->subsectime : NULL); + + if (! is_null($this->model)) + $query->where('model','=',$this->model); + + if (! is_null($this->make)) + $query->where('make','=',$this->make); + + }); + } + }); + + return $po; + } +} diff --git a/app/Model/PhotoPerson.php b/app/Model/PhotoPerson.php new file mode 100644 index 0000000..a84f6bb --- /dev/null +++ b/app/Model/PhotoPerson.php @@ -0,0 +1,9 @@ + diff --git a/application/classes/Model/Photo.php b/application/classes/Model/Photo.php index 10ebca5..2aa8b61 100644 --- a/application/classes/Model/Photo.php +++ b/application/classes/Model/Photo.php @@ -185,6 +185,8 @@ class Model_Photo extends ORM { return join('|',array_keys($result)); } + +/* private function rotate(Imagick $imo) { switch ($this->orientation) { case 3: $imo->rotateImage(new ImagickPixel('none'),180); @@ -195,6 +197,7 @@ class Model_Photo extends ORM { break; } } +*/ public function rotation() { switch ($this->orientation) { @@ -211,6 +214,7 @@ class Model_Photo extends ORM { return sprintf('%s...%s',substr($signature,0,$chars),substr($signature,-1*$chars)); } +/* public function thumbnail($rotate=TRUE) { if (! $this->thumbnail) return NULL; @@ -224,6 +228,7 @@ class Model_Photo extends ORM { return $imo->getImageBlob(); } +*/ public function thumbnail_sig() { return md5($this->thumbnail()).':'.strlen($this->thumbnail()); diff --git a/application/classes/Model/Photo/People.php b/application/classes/Model/Photo/People.php deleted file mode 100644 index 273da9c..0000000 --- a/application/classes/Model/Photo/People.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/application/classes/Model/Photo/Tag.php b/application/classes/Model/Photo/Tag.php deleted file mode 100644 index 4e5b5d6..0000000 --- a/application/classes/Model/Photo/Tag.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/application/classes/Model/Tags.php b/application/classes/Model/Tags.php deleted file mode 100644 index 4f109f3..0000000 --- a/application/classes/Model/Tags.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/application/classes/Task/Photo/Import.php b/application/classes/Task/Photo/Import.php deleted file mode 100644 index 4c07036..0000000 --- a/application/classes/Task/Photo/Import.php +++ /dev/null @@ -1,186 +0,0 @@ -NULL, // Directory of Photos to Import - 'file'=>NULL, // Photo File to Import - 'tags'=>NULL, - 'people'=>NULL, - 'ignoredupe'=>FALSE, // Skip duplicate photos - 'deletedupe'=>FALSE, // Skip duplicate photos - 'verbose'=>FALSE, // Photo File to Import - ); - - private function _adddir(&$value,$key,$path='') { - if ($path) - $value = sprintf('%s/%s',$path,$value); - } - - protected function _execute(array $params) { - $tags = NULL; - $t = $p = array(); - - if (is_null($params['file']) AND is_null($params['dir']) OR ($params['file'] AND $params['dir'])) - throw new Kohana_Exception('Missing filename, please use --file= OR --dir='); - - if ($params['dir']) { - $files = array_diff(scandir($params['dir']),array('.','..')); - - array_walk($files,'static::_adddir',$params['dir']); - - } else - $files = array($params['file']); - - // Tags - if ($params['tags']) { - $tags = explode(',',$params['tags']); - $t = ORM::factory('Tags')->where('tag','IN',$tags)->find_all(); - } - - // People - if ($params['people']) { - $tags = explode(',',$params['people']); - $p = ORM::factory('People')->where('tag','IN',$tags)->find_all(); - } - - $c = 0; - foreach ($files as $file) { - if ($params['verbose']) - printf("Processing file [%s]\n",$file); - - if (preg_match('/@__thumb/',$file) OR preg_match('/\/._/',$file)) { - $this->writelog(sprintf("Ignoring file [%s]\n",$file)); - continue; - } - - if (! in_array(strtolower(pathinfo($file,PATHINFO_EXTENSION)),$this->_accepted)) { - $this->writelog(sprintf("Ignoring file [%s]\n",$file)); - continue; - } - - $c++; - - $po = ORM::factory('Photo',array('filename'=>$file)); - - if (! $po->loaded()) - $po->filename = realpath($file); - - $po->date_taken = $this->dbcol(strtotime($po->io('exif:DateTime'))); - $po->signature = $this->dbcol($po->io()->getImageSignature()); - $po->make = $this->dbcol($po->io('exif:Make')); - $po->model = $this->dbcol($po->io('exif:Model')); - $po->height = $this->dbcol($po->io()->getImageheight()); - $po->width = $this->dbcol($po->io()->getImageWidth()); - $po->orientation = $this->dbcol($po->io()->getImageOrientation()); - $po->subsectime = $this->dbcol($po->io('exif:SubSecTimeOriginal')); - - $po->gps_lat = $this->dbcol($po->gps(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLatitude')),$po->io()->getImageProperty('exif:GPSLatitudeRef'))); - $po->gps_lon = $this->dbcol($po->gps(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLongitude')),$po->io()->getImageProperty('exif:GPSLongitudeRef'))); - - try { - $po->thumbnail = $this->dbcol(exif_thumbnail($po->filename)); - } catch (Exception $e) { - } - - switch ($params['verbose']) { - case 1: - print_r($po->what_changed()); - break; - - case 2: - print_r($po->io()->getImageProperties()); - break; - } - - $x = $po->list_duplicate()->find_all(); - if (count($x)) { - $skip = FALSE; - - foreach ($x as $o) { - # We'll only ignore based on the same signature. - if ($params['ignoredupe'] AND ($po->signature == $o->signature)) { - $skip = TRUE; - $this->writelog(sprintf("Ignore file [%s], it's the same as [%s (%s)]\n",$po->filename,$o->id,$o->file_path())); - break; - - } elseif ($params['deletedupe'] AND ($po->signature == $o->signature) AND ($po->filename != $o->filename)) { - $skip = TRUE; - $this->writelog(sprintf("Delete file [%s], it's the same as [%s (%s)] with signature [%s]\n",$po->filename,$o->id,$o->file_path(),$po->signature)); - unlink($file); - } - } - - unset($x); - - if ($skip) - continue; - else - $po->duplicate = '1'; - } - - if (! $po->changed()) - $this->writelog(sprintf("Image [%s] already in DB: %s\n",$file,$po->id)); - - $po->save(); - - if ($po->saved()) - $this->writelog(sprintf("Image [%s] stored in DB: %s\n",$file,$po->id)); - - // Record our tags - foreach ($t as $o) { - $x = ORM::factory('Photo_Tag')->where('tag_id','=',$o->id)->where('photo_id','=',$po->id)->find(); - $x->tag_id = $o->id; - $x->photo_id = $po->id; - $x->save(); - } - - // Record our people - foreach ($p as $o) { - $x = ORM::factory('Photo_People',array('people_id'=>$o->id,'photo_id'=>$po->id)); - $x->people_id = $o->id; - $x->photo_id = $po->id; - $x->save(); - } - - unset($po); - unset($x); - unset($o); - } - - if ($c > 1) - return sprintf("Images processed: %s\n",$c); - } - - // Force the return of a string or NULL - private function dbcol($val,$noval=NULL) { - return $val ? (string)$val : $noval; - } - - private function writelog($msg) { - if (! $this->_log) - return; - - static $fh = NULL; - - if (is_null($fh)) - $fh = fopen($this->_log,'a+'); - - fwrite($fh,$msg); - } -} -?> diff --git a/composer.json b/composer.json index 4943e17..f551198 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,9 @@ "mockery/mockery": "0.9.*", "phpunit/phpunit": "~4.0", "symfony/css-selector": "2.8.*|3.0.*", - "symfony/dom-crawler": "2.8.*|3.0.*" + "symfony/dom-crawler": "2.8.*|3.0.*", + "xethron/migrations-generator": "dev-l5", + "way/generators": "dev-feature/laravel-five-stable" }, "autoload": { "classmap": [ @@ -46,5 +48,11 @@ }, "config": { "preferred-install": "dist" + }, + "repositories": { + "repo-name": { + "type": "git", + "url": "git@github.com:jamisonvalenta/Laravel-4-Generators.git" + } } } diff --git a/composer.lock b/composer.lock index f777581..0ac80b8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c284a9c122da36c99a8b6597bdce7aa6", - "content-hash": "8b1485987e7c5949da82435d403e52e8", + "hash": "06f9a4d19eda3cf3c92386077c05117c", + "content-hash": "e32614d49ea2fa40cc882537b7125da4", "packages": [ { "name": "classpreloader/classpreloader", @@ -1780,6 +1780,354 @@ } ], "packages-dev": [ + { + "name": "doctrine/annotations", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2015-08-31 12:32:49" + }, + { + "name": "doctrine/cache", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/f8af318d14bdb0eff0336795b428b547bd39ccb6", + "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6", + "shasum": "" + }, + "require": { + "php": "~5.5|~7.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2015-12-31 16:37:02" + }, + { + "name": "doctrine/collections", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ], + "time": "2015-04-14 22:21:58" + }, + { + "name": "doctrine/common", + "version": "v2.6.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "a579557bc689580c19fee4e27487a67fe60defc0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0", + "reference": "a579557bc689580c19fee4e27487a67fe60defc0", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": "~5.5|~7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ], + "time": "2015-12-25 13:18:31" + }, + { + "name": "doctrine/dbal", + "version": "v2.5.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/abbdfd1cff43a7b99d027af3be709bc8fc7d4769", + "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769", + "shasum": "" + }, + "require": { + "doctrine/common": ">=2.4,<2.7-dev", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "2.*" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ], + "time": "2016-01-05 22:11:12" + }, { "name": "doctrine/instantiator", "version": "1.0.5", @@ -1834,6 +2182,60 @@ ], "time": "2015-06-14 21:17:01" }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09 13:34:57" + }, { "name": "fzaninotto/faker", "version": "v1.6.0", @@ -3101,6 +3503,45 @@ "homepage": "https://symfony.com", "time": "2016-06-14 11:18:07" }, + { + "name": "way/generators", + "version": "dev-feature/laravel-five-stable", + "source": { + "type": "git", + "url": "git@github.com:jamisonvalenta/Laravel-4-Generators.git", + "reference": "a358bb44f517e2b3c1fd4f848f2646857c75b3a4" + }, + "require": { + "illuminate/support": "~5.0", + "php": ">=5.4.0" + }, + "require-dev": { + "behat/behat": "~2.5.1", + "behat/mink": "~1.5.0", + "behat/mink-extension": "~1.2.0", + "behat/mink-goutte-driver": "~1.0.9", + "behat/mink-selenium2-driver": "~1.1.1", + "phpspec/phpspec": "~2.0", + "phpunit/phpunit": "~3.7" + }, + "type": "library", + "autoload": { + "psr-0": { + "Way\\Generators": "src/" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeffrey Way", + "email": "jeffrey@jeffrey-way.com" + } + ], + "description": "Rapidly generate resources, migrations, models, and much more.", + "time": "2015-02-17 06:26:25" + }, { "name": "webmozart/assert", "version": "1.0.2", @@ -3149,11 +3590,66 @@ "validate" ], "time": "2015-08-24 13:29:44" + }, + { + "name": "xethron/migrations-generator", + "version": "dev-l5", + "source": { + "type": "git", + "url": "https://github.com/Xethron/migrations-generator.git", + "reference": "e5e86efb5731e6859ea0d96a806159f9f2c26ce1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Xethron/migrations-generator/zipball/e5e86efb5731e6859ea0d96a806159f9f2c26ce1", + "reference": "e5e86efb5731e6859ea0d96a806159f9f2c26ce1", + "shasum": "" + }, + "require": { + "doctrine/dbal": "~2.4", + "illuminate/support": ">=4.1", + "php": ">=5.4.0", + "way/generators": "dev-feature/laravel-five-stable" + }, + "require-dev": { + "illuminate/cache": ">=4.1.0", + "illuminate/console": ">=4.1.0", + "mockery/mockery": ">=0.9.0", + "phpunit/phpunit": ">=4.0.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Xethron\\MigrationsGenerator": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Breytenbach", + "email": "bernhard@coffeecode.co.za" + } + ], + "description": "Generates Laravel Migrations from an existing database", + "keywords": [ + "artisan", + "generator", + "laravel", + "migration", + "migrations" + ], + "time": "2015-02-23 05:43:08" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "xethron/migrations-generator": 20, + "way/generators": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/config/app.php b/config/app.php index 7c1987c..7c0bb8e 100644 --- a/config/app.php +++ b/config/app.php @@ -52,7 +52,7 @@ return [ | */ - 'timezone' => 'UTC', + 'timezone' => 'Australia/Melbourne', /* |-------------------------------------------------------------------------- @@ -158,6 +158,8 @@ return [ App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, + Way\Generators\GeneratorsServiceProvider::class, + Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class, ], /* diff --git a/config/photo.php b/config/photo.php new file mode 100644 index 0000000..7506f2b --- /dev/null +++ b/config/photo.php @@ -0,0 +1,9 @@ +'/var/www/sites/co.dlcm.p/store', + 'import'=>[ + 'accepted'=>['jpg'], + 'log'=>'/tmp/import.log', + ], +]; diff --git a/database/migrations/2016_06_03_055603_create_photo_table.php b/database/migrations/2016_06_03_055603_create_photo_table.php new file mode 100644 index 0000000..aebad5e --- /dev/null +++ b/database/migrations/2016_06_03_055603_create_photo_table.php @@ -0,0 +1,48 @@ +bigInteger('id', true); + $table->timestamps(); + $table->integer('date_taken')->nullable(); + $table->smallInteger('subsectime')->nullable(); + $table->string('filename', 128); + $table->string('signature', 64)->nullable(); + $table->string('make', 32)->nullable(); + $table->string('model', 32)->nullable(); + $table->integer('height')->nullable(); + $table->integer('width')->nullable(); + $table->integer('orientation')->nullable(); + $table->float('gps_lat', 10, 0)->nullable(); + $table->float('gps_lon', 10, 0)->nullable(); + $table->binary('thumbnail', 65535)->nullable(); + $table->boolean('duplicate')->nullable(); + $table->boolean('remove')->nullable(); + $table->boolean('flag')->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('photo'); + } + +} diff --git a/database/migrations/2016_06_03_055604_create_people_table.php b/database/migrations/2016_06_03_055604_create_people_table.php new file mode 100644 index 0000000..617dd70 --- /dev/null +++ b/database/migrations/2016_06_03_055604_create_people_table.php @@ -0,0 +1,35 @@ +integer('id', true); + $table->string('tag', 16)->unique('tag_UNIQUE'); + $table->string('name', 64)->nullable(); + $table->integer('date_birth')->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('people'); + } + +} diff --git a/database/migrations/2016_06_03_055604_create_photo_people_table.php b/database/migrations/2016_06_03_055604_create_photo_people_table.php new file mode 100644 index 0000000..4109647 --- /dev/null +++ b/database/migrations/2016_06_03_055604_create_photo_people_table.php @@ -0,0 +1,36 @@ +bigInteger('id', true); + $table->timestamps(); + $table->integer('people_id'); + $table->bigInteger('photo_id')->index('fk_pp_ph_idx'); + $table->unique(['people_id','photo_id'], 'UNIQUE'); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('photo_people'); + } + +} diff --git a/database/migrations/2016_06_03_055604_create_photo_tag_table.php b/database/migrations/2016_06_03_055604_create_photo_tag_table.php new file mode 100644 index 0000000..08153d9 --- /dev/null +++ b/database/migrations/2016_06_03_055604_create_photo_tag_table.php @@ -0,0 +1,36 @@ +bigInteger('id', true); + $table->timestamps(); + $table->bigInteger('photo_id'); + $table->bigInteger('tag_id')->index('pt_t_idx'); + $table->unique(['photo_id','tag_id'], 'UNIQUE'); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('photo_tag'); + } + +} diff --git a/database/migrations/2016_06_03_055604_create_tags_table.php b/database/migrations/2016_06_03_055604_create_tags_table.php new file mode 100644 index 0000000..5189df5 --- /dev/null +++ b/database/migrations/2016_06_03_055604_create_tags_table.php @@ -0,0 +1,34 @@ +bigInteger('id', true); + $table->string('tag', 16)->unique('tag_UNIQUE'); + $table->string('description', 45)->nullable(); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('tags'); + } + +} diff --git a/database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_people_table.php b/database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_people_table.php new file mode 100644 index 0000000..942bb80 --- /dev/null +++ b/database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_people_table.php @@ -0,0 +1,37 @@ +foreign('people_id', 'fk_pp_p')->references('id')->on('people')->onUpdate('NO ACTION')->onDelete('NO ACTION'); + $table->foreign('photo_id', 'fk_pp_ph')->references('id')->on('photo')->onUpdate('NO ACTION')->onDelete('NO ACTION'); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('photo_people', function(Blueprint $table) + { + $table->dropForeign('fk_pp_p'); + $table->dropForeign('fk_pp_ph'); + }); + } + +} diff --git a/database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_tag_table.php b/database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_tag_table.php new file mode 100644 index 0000000..60a8191 --- /dev/null +++ b/database/migrations/2016_06_03_055605_add_foreign_keys_to_photo_tag_table.php @@ -0,0 +1,37 @@ +foreign('photo_id', 'fk_pt_p')->references('id')->on('photo')->onUpdate('NO ACTION')->onDelete('NO ACTION'); + $table->foreign('tag_id', 'fk_pt_t')->references('id')->on('tags')->onUpdate('NO ACTION')->onDelete('NO ACTION'); + }); + } + + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('photo_tag', function(Blueprint $table) + { + $table->dropForeign('fk_pt_p'); + $table->dropForeign('fk_pt_t'); + }); + } + +} diff --git a/resources/views/auth/emails/password.blade.php b/resources/views/auth/emails/password.blade.php new file mode 100644 index 0000000..1b53830 --- /dev/null +++ b/resources/views/auth/emails/password.blade.php @@ -0,0 +1 @@ +Click here to reset your password: {{ $link }} diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php new file mode 100644 index 0000000..a1ad8cf --- /dev/null +++ b/resources/views/auth/login.blade.php @@ -0,0 +1,66 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Login
+
+
+ {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+
+
+ +
+
+
+ +
+
+ + + Forgot Your Password? +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php new file mode 100644 index 0000000..33df8e3 --- /dev/null +++ b/resources/views/auth/passwords/email.blade.php @@ -0,0 +1,47 @@ +@extends('layouts.app') + + +@section('content') +
+
+
+
+
Reset Password
+
+ @if (session('status')) +
+ {{ session('status') }} +
+ @endif + +
+ {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php new file mode 100644 index 0000000..64e8297 --- /dev/null +++ b/resources/views/auth/passwords/reset.blade.php @@ -0,0 +1,70 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Reset Password
+ +
+
+ {{ csrf_field() }} + + + +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+ +
+ + + @if ($errors->has('password_confirmation')) + + {{ $errors->first('password_confirmation') }} + + @endif +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php new file mode 100644 index 0000000..4705d6e --- /dev/null +++ b/resources/views/auth/register.blade.php @@ -0,0 +1,82 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Register
+
+
+ {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('name')) + + {{ $errors->first('name') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('email')) + + {{ $errors->first('email') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+ +
+ + +
+ + + @if ($errors->has('password_confirmation')) + + {{ $errors->first('password_confirmation') }} + + @endif +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/common/errors.blade.php b/resources/views/common/errors.blade.php new file mode 100644 index 0000000..da2afaa --- /dev/null +++ b/resources/views/common/errors.blade.php @@ -0,0 +1,16 @@ + + +@if (count($errors) > 0) + +
+ Whoops! Something went wrong! + +

+ +
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+@endif diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php new file mode 100644 index 0000000..d909843 --- /dev/null +++ b/resources/views/layouts/app.blade.php @@ -0,0 +1,82 @@ + + + + + + + + Laravel + + + + + + + + {{-- --}} + + + + + + + @yield('content') + + + + + {{-- --}} + + diff --git a/resources/views/photo/view.blade.php b/resources/views/photo/view.blade.php new file mode 100644 index 0000000..e5ebfd8 --- /dev/null +++ b/resources/views/photo/view.blade.php @@ -0,0 +1,17 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
Photo id; ?>
+ +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 87710ac..06e2217 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,45 +1,17 @@ - - - - Laravel +@extends('layouts.app') - +@section('content') +
+
+
+
+
Welcome
- - - -
-
-
Laravel 5
+
+ Your Application's Landing Page. +
- - +
+
+@endsection From e297c5ca7e7b30dfd1ebedec158c256ff35645af Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 22 Jun 2016 16:51:31 +1000 Subject: [PATCH 3/8] Added some info to the view --- app/Console/Commands/Import.php | 4 +- app/Model/Photo.php | 63 ++++++++++++++++++++++------ resources/views/photo/view.blade.php | 35 +++++++++++++++- 3 files changed, 87 insertions(+), 15 deletions(-) diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php index d975afc..bac1a8b 100644 --- a/app/Console/Commands/Import.php +++ b/app/Console/Commands/Import.php @@ -144,8 +144,8 @@ class Import extends Command $po->width = $po->io()->getImageWidth(); $po->orientation = $po->io()->getImageOrientation(); - $po->gps_lat = $po->gps(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLatitude')),$po->io()->getImageProperty('exif:GPSLatitudeRef')); - $po->gps_lon = $po->gps(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLongitude')),$po->io()->getImageProperty('exif:GPSLongitudeRef')); + $po->gps_lat = $po->latlon(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLatitude')),$po->io()->getImageProperty('exif:GPSLatitudeRef')); + $po->gps_lon = $po->latlon(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLongitude')),$po->io()->getImageProperty('exif:GPSLongitudeRef')); try { $po->thumbnail = exif_thumbnail($po->file_path()); diff --git a/app/Model/Photo.php b/app/Model/Photo.php index efc0031..34f74c9 100644 --- a/app/Model/Photo.php +++ b/app/Model/Photo.php @@ -19,6 +19,10 @@ class Photo extends Model 8=>-90, ]; + public function date_taken() { + return $this->date_taken ? (date('Y-m-d H:i:s',$this->date_taken).($this->subsectime ? '.'.$this->subsectime : '')) : 'UNKNOWN'; + } + /** * Determine the new name for the image */ @@ -33,7 +37,35 @@ class Photo extends Model return (($short OR preg_match('/^\//',$file)) ? '' : config('photo.dir').DIRECTORY_SEPARATOR).$file; } - public function gps(array $coordinate,$hemisphere) { + /** + * Calculate a file path ID based on the id of the file + */ + public function file_path_id($sep=3,$depth=9) { + return trim(chunk_split(sprintf("%0{$depth}s",$this->id),$sep,'/'),'/'); + } + + /** + * Display the GPS coordinates + */ + public function gps() { + return ($this->gps_lat AND $this->gps_lon) ? sprintf('%s/%s',$this->gps_lat,$this->gps_lon) : 'UNKNOWN'; + } + + /** + * Return an Imagick object or attribute + * + */ + public function io($attr=NULL) { + if (is_null($this->_io)) + $this->_io = new \Imagick($this->file_path()); + + return is_null($attr) ? $this->_io : $this->_io->getImageProperty($attr); + } + + /** + * Calculate the GPS coordinates + */ + public function latlon(array $coordinate,$hemisphere) { if (! $coordinate OR ! $hemisphere) return NULL; @@ -57,17 +89,6 @@ class Photo extends Model return round($sign*($degrees+$minutes/60+$seconds/3600),$degrees > 100 ? 3 : 4); } - /** - * Return an Imagick object or attribute - * - */ - public function io($attr=NULL) { - if (is_null($this->_io)) - $this->_io = new \Imagick($this->file_path()); - - return is_null($attr) ? $this->_io : $this->_io->getImageProperty($attr); - } - /** * Rotate the image * @@ -80,6 +101,14 @@ class Photo extends Model return $imo->getImageBlob(); } + /** + * Determine if the image should be moved + */ + public function shouldMove() + { + return ($this->filename != $this->file_path(TRUE,TRUE)); + } + /** * Return the image's thumbnail * @@ -98,6 +127,16 @@ class Photo extends Model return $this->rotate($imo); } + /** + * Return the extension of the image + */ + public function type($mime=FALSE) { + return strtolower($mime ? File::mime_by_ext(pathinfo($this->filename,PATHINFO_EXTENSION)) : pathinfo($this->filename,PATHINFO_EXTENSION)); + } + + /** + * Find duplicate images based on some attributes of the current image + */ public function list_duplicate() { $po = DB::table('photo'); diff --git a/resources/views/photo/view.blade.php b/resources/views/photo/view.blade.php index e5ebfd8..44dd991 100644 --- a/resources/views/photo/view.blade.php +++ b/resources/views/photo/view.blade.php @@ -8,7 +8,40 @@
Photo id; ?>
- +
+
+
+
Filename
file_path(TRUE); ?>
+ shouldMove()) : ?> +
NEW Filename
file_path(TRUE,TRUE); ?>
+ +
+
Date Taken
date_taken(); ?>
+
Camera
make; ?>
+
Model
model; ?>
+
+
Location
+ gps() == 'UNKNOWN') : ?> + UNKNOWN + +
+ + + +
+
+
From 4c317a811c720788ec04cec27bc9919538b16d14 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 23 Jun 2016 07:07:44 +1000 Subject: [PATCH 4/8] Enabled photos to be moved via a queue --- app/Console/Commands/Import.php | 30 +++++++++------ app/Jobs/PhotoMove.php | 37 +++++++++++++++++++ .../2016_06_22_221832_create_jobs_table.php | 37 +++++++++++++++++++ ..._06_22_230327_create_failed_jobs_table.php | 33 +++++++++++++++++ 4 files changed, 126 insertions(+), 11 deletions(-) create mode 100644 app/Jobs/PhotoMove.php create mode 100644 database/migrations/2016_06_22_221832_create_jobs_table.php create mode 100644 database/migrations/2016_06_22_230327_create_failed_jobs_table.php diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php index bac1a8b..7f79da7 100644 --- a/app/Console/Commands/Import.php +++ b/app/Console/Commands/Import.php @@ -9,9 +9,13 @@ use App\Model\PhotoPerson; use App\Model\Photo; use App\Model\PhotoTag; use App\Model\Tag; +use Illuminate\Foundation\Bus\DispatchesJobs; +use App\Jobs\PhotoMove; class Import extends Command { + use DispatchesJobs; + /** * The name and signature of the console command. * @@ -65,22 +69,24 @@ class Import extends Command // Exclude . & .. from the path. $files = array_diff(scandir($dir),array('.','..')); - // Determine if our dir is releative to where we store data - $dir = preg_replace('/^\//','',str_replace(config('photo.dir'),'',$dir)); - - // Add our path - if ($dir) - array_walk($files,function(&$value,$key,$path='') { - if ($path) { - $value = sprintf('%s/%s',$path,$value); - } - },$dir); } elseif ($this->option('file')) { - $files = array($this->option('file')); + $dir = dirname($this->option('file')); + $files = array(basename($this->option('file'))); } + // Determine if our dir is releative to where we store data + $dir = preg_replace('/^\//','',str_replace(config('photo.dir'),'',$dir)); + + // Add our path + if ($dir) + array_walk($files,function(&$value,$key,$path='') { + if ($path) { + $value = sprintf('%s/%s',$path,$value); + } + },$dir); + // Show a progress bar $bar = $this->output->createProgressBar(count($files)); $bar->setFormat("%current%/%max% [%bar%] %percent:3s%% (%memory%) (%remaining%) "); @@ -212,6 +218,8 @@ class Import extends Command $x->photo_id = $po->id; $x->save(); } + + $this->dispatch((new PhotoMove($po))->onQueue('move')); } $bar->finish(); diff --git a/app/Jobs/PhotoMove.php b/app/Jobs/PhotoMove.php new file mode 100644 index 0000000..cc1fb37 --- /dev/null +++ b/app/Jobs/PhotoMove.php @@ -0,0 +1,37 @@ +photo = $photo; + } + + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + Log::info('Moving: '.$this->photo->id); + } +} diff --git a/database/migrations/2016_06_22_221832_create_jobs_table.php b/database/migrations/2016_06_22_221832_create_jobs_table.php new file mode 100644 index 0000000..81b2d29 --- /dev/null +++ b/database/migrations/2016_06_22_221832_create_jobs_table.php @@ -0,0 +1,37 @@ +bigIncrements('id'); + $table->string('queue'); + $table->longText('payload'); + $table->tinyInteger('attempts')->unsigned(); + $table->tinyInteger('reserved')->unsigned(); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); + $table->index(['queue', 'reserved', 'reserved_at']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('jobs'); + } +} diff --git a/database/migrations/2016_06_22_230327_create_failed_jobs_table.php b/database/migrations/2016_06_22_230327_create_failed_jobs_table.php new file mode 100644 index 0000000..3d733b6 --- /dev/null +++ b/database/migrations/2016_06_22_230327_create_failed_jobs_table.php @@ -0,0 +1,33 @@ +increments('id'); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('failed_jobs'); + } +} From 3361427c7564a8d0a07cee484daa06bd76847d13 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 29 Jun 2016 14:04:02 +1000 Subject: [PATCH 5/8] Enabled move and queue processing --- app/Console/Commands/Import.php | 12 +-- app/Console/Commands/Move.php | 99 +++++++++++++++++++++++++ app/Console/Kernel.php | 1 + app/Jobs/PhotoMove.php | 42 ++++++----- app/Model/Photo.php | 63 +++++++++++++++- app/Providers/AppServiceProvider.php | 15 +++- app/Providers/EventServiceProvider.php | 3 - application/classes/Task/Photo/Move.php | 58 --------------- 8 files changed, 201 insertions(+), 92 deletions(-) create mode 100644 app/Console/Commands/Move.php delete mode 100644 application/classes/Task/Photo/Move.php diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php index 7f79da7..14299d2 100644 --- a/app/Console/Commands/Import.php +++ b/app/Console/Commands/Import.php @@ -9,13 +9,9 @@ use App\Model\PhotoPerson; use App\Model\Photo; use App\Model\PhotoTag; use App\Model\Tag; -use Illuminate\Foundation\Bus\DispatchesJobs; -use App\Jobs\PhotoMove; class Import extends Command { - use DispatchesJobs; - /** * The name and signature of the console command. * @@ -77,7 +73,7 @@ class Import extends Command } // Determine if our dir is releative to where we store data - $dir = preg_replace('/^\//','',str_replace(config('photo.dir'),'',$dir)); + $dir = Photo::path($dir); // Add our path if ($dir) @@ -150,8 +146,8 @@ class Import extends Command $po->width = $po->io()->getImageWidth(); $po->orientation = $po->io()->getImageOrientation(); - $po->gps_lat = $po->latlon(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLatitude')),$po->io()->getImageProperty('exif:GPSLatitudeRef')); - $po->gps_lon = $po->latlon(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLongitude')),$po->io()->getImageProperty('exif:GPSLongitudeRef')); + $po->gps_lat = Photo::latlon(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLatitude')),$po->io()->getImageProperty('exif:GPSLatitudeRef')); + $po->gps_lon = Photo::latlon(preg_split('/,\s?/',$po->io()->getImageProperty('exif:GPSLongitude')),$po->io()->getImageProperty('exif:GPSLongitudeRef')); try { $po->thumbnail = exif_thumbnail($po->file_path()); @@ -218,8 +214,6 @@ class Import extends Command $x->photo_id = $po->id; $x->save(); } - - $this->dispatch((new PhotoMove($po))->onQueue('move')); } $bar->finish(); diff --git a/app/Console/Commands/Move.php b/app/Console/Commands/Move.php new file mode 100644 index 0000000..0ce769a --- /dev/null +++ b/app/Console/Commands/Move.php @@ -0,0 +1,99 @@ +option('file')) + { + $po = Photo::notRemove()->notDuplicate()->where('filename',Photo::path($this->option('file'))); + } + elseif ($this->option('id')) + { + $po = Photo::notRemove()->notDuplicate()->where('id',Photo::path($this->option('id'))); + } + else + { + $po = Photo::notRemove()->notDuplicate(); + } + + // Show a progress bar + $bar = $this->output->createProgressBar($po->count()); + $bar->setFormat("%current%/%max% [%bar%] %percent:3s%% (%memory%) (%remaining%) "); + $bar->setRedrawFrequency(100); + + $po->chunk(1,function($photo) use ($bar) { + while ($po = $photo->shift()) + { + if (($x = $po->moveable()) === TRUE) { + Log::info(sprintf('Moving: (%s)[%s]',$po->id,$po->filename)); + + if (rename($po->file_path(),$po->file_path(FALSE,TRUE))) + { + // Convert the path to a relative one. + $po->filename = $po->file_path(TRUE,TRUE); + + // @todo If the DB update failed, move it back. + if (! $po->save()) # AND ! rename($path,$po->file_path())) + { + $this->error(sprintf('Save after rename failed for (%s)',$po->id)); + continue; + } + } + else + { + $this->error(sprintf('Rename failed for (%s)',$po->id)); + continue; + } + + chmod($po->file_path(),0444); + } + else + { + if ($x > 0) + $this->warn(sprintf('Unable to move (%s) [%s] to [%s], moveable returned (%s)',$po->id,$po->file_path(),$po->file_path(FALSE,TRUE),$x)); + } + } + + $bar->advance(); + }); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 6ad3780..cdb6402 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -14,6 +14,7 @@ class Kernel extends ConsoleKernel */ protected $commands = [ Commands\Import::class, + Commands\Move::class, ]; /** diff --git a/app/Jobs/PhotoMove.php b/app/Jobs/PhotoMove.php index cc1fb37..a565365 100644 --- a/app/Jobs/PhotoMove.php +++ b/app/Jobs/PhotoMove.php @@ -8,30 +8,32 @@ use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use App\Model\Photo; +use Artisan; class PhotoMove extends Job implements ShouldQueue { - use InteractsWithQueue, SerializesModels; + use InteractsWithQueue, SerializesModels; - private $photo; + private $photo; - /** - * Create a new job instance. - * - * @return void - */ - public function __construct(Photo $photo) - { - $this->photo = $photo; - } + /** + * Create a new job instance. + * + * @return void + */ + public function __construct(Photo $photo) + { + $this->photo = $photo; + } - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - Log::info('Moving: '.$this->photo->id); - } + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + Log::info(__METHOD__.' Moving: '.$this->photo->id); + Artisan::call('photo:move',['--id' => $this->photo->id]); + } } diff --git a/app/Model/Photo.php b/app/Model/Photo.php index 34f74c9..8a7775f 100644 --- a/app/Model/Photo.php +++ b/app/Model/Photo.php @@ -19,6 +19,32 @@ class Photo extends Model 8=>-90, ]; + /** + * Photo's NOT pending removal. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeNotRemove($query) + { + return $query->where(function($query) { + $query->where('remove','!=',TRUE) + ->orWhere('remove','=',NULL); + }); + } + + /** + * Photo's NOT duplicate. + * + * @return \Illuminate\Database\Eloquent\Builder + */ + public function scopeNotDuplicate($query) + { + return $query->where(function($query) { + $query->where('duplicate','!=',TRUE) + ->orWhere('duplicate','=',NULL); + }); + } + public function date_taken() { return $this->date_taken ? (date('Y-m-d H:i:s',$this->date_taken).($this->subsectime ? '.'.$this->subsectime : '')) : 'UNKNOWN'; } @@ -65,7 +91,7 @@ class Photo extends Model /** * Calculate the GPS coordinates */ - public function latlon(array $coordinate,$hemisphere) { + public static function latlon(array $coordinate,$hemisphere) { if (! $coordinate OR ! $hemisphere) return NULL; @@ -89,6 +115,37 @@ class Photo extends Model return round($sign*($degrees+$minutes/60+$seconds/3600),$degrees > 100 ? 3 : 4); } + /** + * Determine if a file is moveable + * + * useID boolean Determine if the path is based on the the ID or date + */ + public function moveable() { + // If the source and target are the same, we dont need to move it + if ($this->file_path() == $this->file_path(FALSE,TRUE)) + return FALSE; + + // If there is already a file in the target. + // @todo If the target file is to be deleted, we could move this file + if (file_exists($this->file_path(FALSE,TRUE))) + return 1; + + // Test if the source is readable + if (! is_readable($this->file_path())) + return 2; + + // Test if the dir is writable (so we can remove the file) + if (! is_writable(dirname($this->file_path()))) + return 3; + + // Test if the target dir is writable + // @todo The target dir may not exist yet, so we should check that a parent exists and is writable. + if (! is_writable(dirname($this->file_path(FALSE,TRUE)))) + return 4; + + return TRUE; + } + /** * Rotate the image * @@ -101,6 +158,10 @@ class Photo extends Model return $imo->getImageBlob(); } + public static function path($path) { + return preg_replace('/^\//','',str_replace(config('photo.dir'),'',$path)); + } + /** * Determine if the image should be moved */ diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 35471f6..12f10d5 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,10 +2,16 @@ namespace App\Providers; +use Log; use Illuminate\Support\ServiceProvider; +use App\Model\Photo; +use App\Jobs\PhotoMove; +use Illuminate\Foundation\Bus\DispatchesJobs; class AppServiceProvider extends ServiceProvider { + use DispatchesJobs; + /** * Bootstrap any application services. * @@ -13,7 +19,14 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - // + // Any photo saved, queue it to be moved. + Photo::saved(function($photo) { + if (! $photo->duplicate AND ($x=$photo->moveable()) === TRUE) + { + Log::info(__METHOD__.': Need to Move: '.$photo->id.'|'.serialize($x)); + $this->dispatch((new PhotoMove($photo))->onQueue('move')); + } + }); } /** diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 58ce962..a793597 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -13,9 +13,6 @@ class EventServiceProvider extends ServiceProvider * @var array */ protected $listen = [ - 'App\Events\SomeEvent' => [ - 'App\Listeners\EventListener', - ], ]; /** diff --git a/application/classes/Task/Photo/Move.php b/application/classes/Task/Photo/Move.php deleted file mode 100644 index ed1f07a..0000000 --- a/application/classes/Task/Photo/Move.php +++ /dev/null @@ -1,58 +0,0 @@ -NULL, // Photo File to Move - 'batch'=>NULL, // Number of photos to move in a batch - 'useid'=>TRUE, // If date not in photo use ID - 'verbose'=>FALSE, // Show some debuggig - ); - - protected function _execute(array $params) { - if ($params['file']) { - $po = ORM::factory('Photo',array('filename'=>$params['file'])); - - } else { - $p = ORM::factory('Photo') - ->where_open() - ->where('remove','!=',TRUE) - ->or_where('remove','is',NULL) - ->where_close() - ->where_open() - ->where('duplicate','!=',TRUE) - ->or_where('duplicate','is',NULL) - ->where_close(); - } - - $c = 0; - foreach ($p->find_all() as $po) { - if ($po->file_path() == $po->file_path(FALSE,($params['useid'] OR $po->date_taken) ? TRUE : FALSE)) - continue; - - if ($params['verbose']) - printf("Processing [%s], file [%s] - newpath [%s]\n",$po->id,$po->file_path(),$po->file_path(FALSE,($params['useid'] OR $po->date_taken) ? TRUE : FALSE)); - - if ($po->move()) - printf("Photo [%s] moved to %s.\n",$po->id,$po->file_path()); - else - printf("Photo [%s] NOT moved to %s.\n",$po->id,$po->file_path(FALSE,TRUE)); - - $c++; - - if (! is_null($params['batch']) AND $c >= $params['batch']) - break; - } - - return sprintf("Images processed [%s]\n",$c); - } -} -?> From c5f0bfffd01a131f251c8b0163783d48c1e177f8 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 29 Jun 2016 20:49:02 +1000 Subject: [PATCH 6/8] Added image view, next/previous and view update --- app/Console/Commands/Import.php | 2 +- app/Http/Controllers/PhotoController.php | 33 ++++++- app/Http/routes.php | 3 + app/Model/Photo.php | 64 +++++++++++++- resources/views/layouts/app.blade.php | 4 +- resources/views/photo/view.blade.php | 104 +++++++++++++++-------- 6 files changed, 168 insertions(+), 42 deletions(-) diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php index 14299d2..9a052fd 100644 --- a/app/Console/Commands/Import.php +++ b/app/Console/Commands/Import.php @@ -151,7 +151,7 @@ class Import extends Command try { $po->thumbnail = exif_thumbnail($po->file_path()); - } catch (Exception $e) { + } catch (\Exception $e) { // @todo Couldnt get the thumbnail, so we should create one. } diff --git a/app/Http/Controllers/PhotoController.php b/app/Http/Controllers/PhotoController.php index 687a5e2..a57b83c 100644 --- a/app/Http/Controllers/PhotoController.php +++ b/app/Http/Controllers/PhotoController.php @@ -19,6 +19,19 @@ class PhotoController extends Controller $this->middleware('guest'); } + public function delete($id) + { + $po = Photo::notRemove()->findOrFail($id); + + if ($po) + { + $po->remove = TRUE; + $po->save(); + } + + return redirect()->action('PhotoController@info',[$id]); + } + public function info($id) { return view('photo.view', ['photo'=> Photo::findOrFail($id)]); @@ -26,6 +39,24 @@ class PhotoController extends Controller public function thumbnail($id) { - return (new Response(Photo::findOrFail($id)->thumbnail()))->header('Content-Type','image/jpg'); + return response(Photo::findOrFail($id)->thumbnail(TRUE))->header('Content-Type','image/jpeg'); + } + + public function undelete($id) + { + $po = Photo::findOrFail($id); + + if ($po) + { + $po->remove = NULL; + $po->save(); + } + + return redirect()->action('PhotoController@info',[$id]); + } + + public function view($id) + { + return response(Photo::findOrFail($id)->image())->header('Content-Type','image/jpeg'); } } diff --git a/app/Http/routes.php b/app/Http/routes.php index 8fa3ec9..9d248b4 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -21,3 +21,6 @@ Route::auth(); Route::get('/info/{id}', 'PhotoController@info')->where('id', '[0-9]+');; Route::get('/thumbnail/{id}', 'PhotoController@thumbnail')->where('id', '[0-9]+');; +Route::get('/view/{id}', 'PhotoController@view')->where('id', '[0-9]+');; +Route::post('/delete/{id}', 'PhotoController@delete')->where('id', '[0-9]+');; +Route::post('/undelete/{id}', 'PhotoController@undelete')->where('id', '[0-9]+');; diff --git a/app/Model/Photo.php b/app/Model/Photo.php index 8a7775f..537770b 100644 --- a/app/Model/Photo.php +++ b/app/Model/Photo.php @@ -77,6 +77,20 @@ class Photo extends Model return ($this->gps_lat AND $this->gps_lon) ? sprintf('%s/%s',$this->gps_lat,$this->gps_lon) : 'UNKNOWN'; } + /** + * Return the image, rotated, minus exif data + */ + public function image() { + $imo = $this->io(); + + if (array_key_exists('exif',$imo->getImageProfiles())) + $imo->removeImageProfile('exif'); + + $this->rotate($imo); + + return $imo->getImageBlob(); + } + /** * Return an Imagick object or attribute * @@ -146,6 +160,17 @@ class Photo extends Model return TRUE; } + /** + * Get the id of the previous photo + */ + public function next() + { + $po = DB::table('photo'); + $po->where('id','>',$this->id); + $po->orderby('id','ASC'); + return $po->first(); + } + /** * Rotate the image * @@ -158,10 +183,43 @@ class Photo extends Model return $imo->getImageBlob(); } - public static function path($path) { + public static function path($path) + { return preg_replace('/^\//','',str_replace(config('photo.dir'),'',$path)); } + /** + * Get the id of the previous photo + */ + public function previous() + { + $po = DB::table('photo'); + $po->where('id','<',$this->id); + $po->orderby('id','DEC'); + return $po->first(); + } + + /** + * Return the photo size + */ + public function size() + { + return filesize($this->file_path()); + } + + /** + * Display the photo signature + */ + public function signature($short=FALSE) + { + return $short ? static::signaturetrim($this->io()->getImageSignature()) : $this->io()->getImageSignature(); + } + + public static function signaturetrim($signature,$chars=6) + { + return sprintf('%s...%s',substr($signature,0,$chars),substr($signature,-1*$chars)); + } + /** * Determine if the image should be moved */ @@ -177,7 +235,9 @@ class Photo extends Model public function thumbnail($rotate=TRUE) { if (! $this->thumbnail) - return NULL; + { + return $this->io()->thumbnailimage(200,200,true,true) ? $this->io()->getImageBlob() : NULL; + } if (! $rotate OR ! array_key_exists($this->orientation,$this->_rotate) OR ! extension_loaded('imagick')) return $this->thumbnail; diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index d909843..e15706b 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -5,7 +5,7 @@ - Laravel + Photo @@ -40,7 +40,7 @@ - Laravel + Photo diff --git a/resources/views/photo/view.blade.php b/resources/views/photo/view.blade.php index 44dd991..28683f4 100644 --- a/resources/views/photo/view.blade.php +++ b/resources/views/photo/view.blade.php @@ -2,49 +2,81 @@ @section('content')
-
-
-
-
Photo id; ?>
+
+
+
+
+ Photo {{ $photo->id }}remove) : ?> - PENDING DELETE +
-
-
-
-
-
Filename
file_path(TRUE); ?>
- shouldMove()) : ?> -
NEW Filename
file_path(TRUE,TRUE); ?>
- -
-
Date Taken
date_taken(); ?>
-
Camera
make; ?>
-
Model
model; ?>
-
-
Location
- gps() == 'UNKNOWN') : ?> - UNKNOWN - -
+
+
+ +
+
    +
  • previous()) : ?>class="disabled"><<
  • +
  • next()) : ?>class="disabled">>>
  • +
+
+ +
+
+
+
Signature
{{ $photo->signature(TRUE) }}
+
Filename
{{ $photo->file_path(TRUE) }}
+ shouldMove()) : ?> +
NEW Filename
{{ $photo->file_path(TRUE,TRUE) }}
+ +
Size
{{ $photo->size() }}
+
+
Date Taken
{{ $photo->date_taken() }}
+
Camera
{{ $photo->make }}
+
Model
{{ $photo->model }}
+
+
Location
+ gps() == 'UNKNOWN') : ?> + UNKNOWN + +
- -
-
-
-
-
-
-
+ + +
+
Exif Data
+ + io()->getImageProperties() as $k => $v) : ?> + + + +
{{ $k }}<>{{ $v }}
+
+
+
+ + remove) : ?> +
+ + + + + + {{ csrf_field() }} +
+
+
+ + @endsection From e1c5b1e413994cdc81fb4d0480d26a2fbd3fd477 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 30 Jun 2016 09:32:57 +1000 Subject: [PATCH 7/8] Enabled duplicate review --- app/Http/Controllers/PhotoController.php | 26 ++++++ app/Http/routes.php | 2 + app/Model/Photo.php | 80 ++++++++++++----- resources/views/layouts/app.blade.php | 2 +- resources/views/photo/duplicates.blade.php | 100 +++++++++++++++++++++ resources/views/photo/view.blade.php | 4 +- 6 files changed, 191 insertions(+), 23 deletions(-) create mode 100644 resources/views/photo/duplicates.blade.php diff --git a/app/Http/Controllers/PhotoController.php b/app/Http/Controllers/PhotoController.php index a57b83c..81881b5 100644 --- a/app/Http/Controllers/PhotoController.php +++ b/app/Http/Controllers/PhotoController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use Illuminate\Http\Response; +use Illuminate\Http\Request; use App\Http\Requests; use App\Model\Photo; @@ -32,6 +33,31 @@ class PhotoController extends Controller return redirect()->action('PhotoController@info',[$id]); } + public function duplicates($id=NULL) + { + return view('photo.duplicates', ['photos'=> Photo::notRemove()->where('duplicate',1)->paginate(1)]); + } + + public function duplicatesUpdate(Request $request) + { + foreach ($request->input('photo') as $id) + { + $po = Photo::findOrFail($id); + + // Set if duplicate + $po->duplicate = $request->input('duplicate.'.$id) ? 1 : NULL; + + // Set if flag + $po->flag = $request->input('flag.'.$id) ? 1 : NULL; + + // Set if delete + $po->remove = $request->input('remove.'.$id) ? 1 : NULL; + + $po->isDirty() AND $po->save(); + } + + return redirect()->action('PhotoController@duplicates','?page='.$request->input('page')); + } public function info($id) { return view('photo.view', ['photo'=> Photo::findOrFail($id)]); diff --git a/app/Http/routes.php b/app/Http/routes.php index 9d248b4..e05b620 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -19,8 +19,10 @@ Route::get('/', function () { Route::auth(); +Route::get('/duplicates/{id?}', 'PhotoController@duplicates')->where('id', '[0-9]+');; Route::get('/info/{id}', 'PhotoController@info')->where('id', '[0-9]+');; Route::get('/thumbnail/{id}', 'PhotoController@thumbnail')->where('id', '[0-9]+');; Route::get('/view/{id}', 'PhotoController@view')->where('id', '[0-9]+');; Route::post('/delete/{id}', 'PhotoController@delete')->where('id', '[0-9]+');; +Route::post('/duplicates', 'PhotoController@duplicatesUpdate')->where('id', '[0-9]+');; Route::post('/undelete/{id}', 'PhotoController@undelete')->where('id', '[0-9]+');; diff --git a/app/Model/Photo.php b/app/Model/Photo.php index 537770b..584b090 100644 --- a/app/Model/Photo.php +++ b/app/Model/Photo.php @@ -26,7 +26,8 @@ class Photo extends Model */ public function scopeNotRemove($query) { - return $query->where(function($query) { + return $query->where(function($query) + { $query->where('remove','!=',TRUE) ->orWhere('remove','=',NULL); }); @@ -39,20 +40,41 @@ class Photo extends Model */ public function scopeNotDuplicate($query) { - return $query->where(function($query) { + return $query->where(function($query) + { $query->where('duplicate','!=',TRUE) ->orWhere('duplicate','=',NULL); }); } - public function date_taken() { + public function date_taken() + { return $this->date_taken ? (date('Y-m-d H:i:s',$this->date_taken).($this->subsectime ? '.'.$this->subsectime : '')) : 'UNKNOWN'; } + /** + * Return the date of the file + */ + public function file_date($type,$format=FALSE) + { + switch ($type) + { + case 'a': $t = fileatime($this->file_path()); + break; + case 'c': $t = filectime($this->file_path()); + break; + case 'm': $t = filemtime($this->file_path()); + break; + } + + return $format ? date('d-m-Y H:i:s',$t) : $t; + } + /** * Determine the new name for the image */ - public function file_path($short=FALSE,$new=FALSE) { + public function file_path($short=FALSE,$new=FALSE) + { $file = $this->filename; if ($new) @@ -66,21 +88,24 @@ class Photo extends Model /** * Calculate a file path ID based on the id of the file */ - public function file_path_id($sep=3,$depth=9) { + public function file_path_id($sep=3,$depth=9) + { return trim(chunk_split(sprintf("%0{$depth}s",$this->id),$sep,'/'),'/'); } /** * Display the GPS coordinates */ - public function gps() { + public function gps() + { return ($this->gps_lat AND $this->gps_lon) ? sprintf('%s/%s',$this->gps_lat,$this->gps_lon) : 'UNKNOWN'; } /** * Return the image, rotated, minus exif data */ - public function image() { + public function image() + { $imo = $this->io(); if (array_key_exists('exif',$imo->getImageProfiles())) @@ -91,11 +116,17 @@ class Photo extends Model return $imo->getImageBlob(); } + public function info() + { + return $this->io() ? $this->io()->getImageProperties() : []; + } + /** * Return an Imagick object or attribute * */ - public function io($attr=NULL) { + protected function io($attr=NULL) + { if (is_null($this->_io)) $this->_io = new \Imagick($this->file_path()); @@ -105,11 +136,13 @@ class Photo extends Model /** * Calculate the GPS coordinates */ - public static function latlon(array $coordinate,$hemisphere) { + public static function latlon(array $coordinate,$hemisphere) + { if (! $coordinate OR ! $hemisphere) return NULL; - for ($i=0; $i<3; $i++) { + for ($i=0; $i<3; $i++) + { $part = explode('/', $coordinate[$i]); if (count($part) == 1) @@ -134,7 +167,8 @@ class Photo extends Model * * useID boolean Determine if the path is based on the the ID or date */ - public function moveable() { + public function moveable() + { // If the source and target are the same, we dont need to move it if ($this->file_path() == $this->file_path(FALSE,TRUE)) return FALSE; @@ -212,7 +246,7 @@ class Photo extends Model */ public function signature($short=FALSE) { - return $short ? static::signaturetrim($this->io()->getImageSignature()) : $this->io()->getImageSignature(); + return $short ? static::signaturetrim($this->signature) : $this->signature; } public static function signaturetrim($signature,$chars=6) @@ -251,32 +285,38 @@ class Photo extends Model /** * Return the extension of the image */ - public function type($mime=FALSE) { + public function type($mime=FALSE) + { return strtolower($mime ? File::mime_by_ext(pathinfo($this->filename,PATHINFO_EXTENSION)) : pathinfo($this->filename,PATHINFO_EXTENSION)); } /** * Find duplicate images based on some attributes of the current image */ - public function list_duplicate() { + public function list_duplicate($includeme=FALSE) + { $po = DB::table('photo'); - if ($this->id) + if ($this->id AND ! $includeme) $po->where('id','!=',$this->id); // Ignore photo's pending removal. - $po->where(function($query) { + $po->where(function($query) + { $query->where('remove','!=',TRUE) ->orWhere('remove','=',NULL); }); // Where the signature is the same - $po->where(function($query) { + $po->where(function($query) + { $query->where('signature','=',$this->signature); // Or they have the same time taken with the same camera - if ($this->date_taken AND ($this->model OR $this->make)) { - $query->orWhere(function($query) { + if ($this->date_taken AND ($this->model OR $this->make)) + { + $query->orWhere(function($query) + { $query->where('date_taken','=',$this->date_taken ? $this->date_taken : NULL); $query->where('subsectime','=',$this->subsectime ? $this->subsectime : NULL); @@ -290,6 +330,6 @@ class Photo extends Model } }); - return $po; + return $po->pluck('id'); } } diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index e15706b..f83ab19 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -47,7 +47,7 @@