diff --git a/.editorconfig b/.editorconfig index 6f313c6..6537ca4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,5 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false -[*.yml] +[*.{yml,yaml}] indent_size = 2 diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 6cc9a9d..ee0592d 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -72,6 +72,7 @@ class Kernel extends HttpKernel \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \Framework\Http\Middleware\Authenticate::class, + \Illuminate\Routing\Middleware\ThrottleRequests::class, \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Auth\Middleware\Authorize::class, diff --git a/composer.json b/composer.json index 1d6a38b..a4df9f2 100644 --- a/composer.json +++ b/composer.json @@ -5,22 +5,22 @@ "license": "MIT", "type": "project", "require": { - "php": ">=7.1.3", - "laravel/framework": "5.8.*", - "lucid-arch/laravel-foundation": "5.8.*", - "laravel/tinker": "^1.0", - "fideloper/proxy": "~4.0" + "php": "^7.2", + "fideloper/proxy": "~4.0", + "laravel/framework": "^6.2", + "laravel/helpers": "^1.1", + "laravel/tinker": "^2.0", + "lucid-arch/laravel-foundation": "^6.0" }, "require-dev": { "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", "nunomaduro/collision": "^3.0", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.0", "symfony/css-selector": "~4.0", "symfony/dom-crawler": "~4.0", - "lucid-arch/laravel-console": "5.8.*", - "beyondcode/laravel-dump-server": "^1.0", - "filp/whoops": "^2.0" + "facade/ignition": "^1.4", + "lucid-arch/laravel-console": "^6.0" }, "autoload": { "classmap": [ diff --git a/config/logging.php b/config/logging.php index 506f2f3..647643a 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,5 +1,6 @@ 'errorlog', 'level' => 'debug', ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], ], ]; diff --git a/config/mail.php b/config/mail.php index 1e21384..46b69fe 100644 --- a/config/mail.php +++ b/config/mail.php @@ -11,8 +11,8 @@ | sending of e-mail. You may specify which one you're using throughout | your application here. By default, Laravel is setup for SMTP mail. | - | Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", - | "sparkpost", "log", "array" + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "log", "array" | */ diff --git a/config/queue.php b/config/queue.php index 8d3dcaf..9a51c35 100644 --- a/config/queue.php +++ b/config/queue.php @@ -80,6 +80,7 @@ */ 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], diff --git a/config/services.php b/config/services.php index d834797..d62bdc8 100644 --- a/config/services.php +++ b/config/services.php @@ -8,7 +8,7 @@ |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such - | as Stripe, Mailgun, SparkPost and others. This file provides a sane + | as Stripe, Mailgun and others. This file provides a sane | default location for this type of information, allowing packages | to have a conventional place to find your various credentials. | @@ -30,10 +30,6 @@ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], - 'sparkpost' => [ - 'secret' => env('SPARKPOST_SECRET'), - ], - 'stripe' => [ 'model' => Framework\User::class, 'key' => env('STRIPE_KEY'), diff --git a/database/migrations/2019_09_28_130641_create_failed_jobs_table.php b/database/migrations/2019_09_28_130641_create_failed_jobs_table.php new file mode 100644 index 0000000..d432dff --- /dev/null +++ b/database/migrations/2019_09_28_130641_create_failed_jobs_table.php @@ -0,0 +1,35 @@ +bigIncrements('id'); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('failed_jobs'); + } +} diff --git a/package.json b/package.json index 71de663..9fcb8ee 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,21 @@ { - "private": true, - "scripts": { - "dev": "npm run development", - "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "watch": "npm run development -- --watch", - "watch-poll": "npm run watch -- --watch-poll", - "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", - "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" - }, - "devDependencies": { - "axios": "^0.18", - "bootstrap": "^4.0.0", - "popper.js": "^1.12", - "cross-env": "^5.1", - "jquery": "^3.2", - "laravel-mix": "^2.0", - "lodash": "^4.17.4", - "vue": "^2.5.17" - } + "private": true, + "scripts": { + "dev": "npm run development", + "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch": "npm run development -- --watch", + "watch-poll": "npm run watch -- --watch-poll", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "prod": "npm run production", + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" + }, + "devDependencies": { + "axios": "^0.19", + "cross-env": "^5.1", + "laravel-mix": "^4.0.7", + "lodash": "^4.17.13", + "resolve-url-loader": "^2.3.1", + "sass": "^1.15.2", + "sass-loader": "^7.1.0" + } } diff --git a/phpunit.xml b/phpunit.xml index 13ed52a..42eea43 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,5 +1,7 @@ - Literally 5.8.x and not 5.8.0 or 5.8.1... ##### 5.7 ``` @@ -50,8 +57,6 @@ composer create-project lucid-arch/laravel=5.7.x my-project-5.7 composer create-project lucid-arch/laravel=5.6.x my-project-5.6 ``` -> Literally 5.6.x and not 5.6.0 or 5.6.1... - ##### 5.5 ``` composer create-project lucid-arch/laravel=5.5.x my-project-5.5 @@ -62,11 +67,6 @@ composer create-project lucid-arch/laravel=5.5.x my-project-5.5 composer create-project lucid-arch/laravel=5.4.x my-project-5.4 ``` -##### 5.3 -``` -composer create-project lucid-arch/laravel=5.3.x my-project-5.3 -``` - ## Introduction ### Directory Structure diff --git a/resources/js/app.js b/resources/js/app.js index 50a81c2..40c55f6 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,30 +1 @@ - -/** - * First we will load all of this project's JavaScript dependencies which - * includes Vue and other libraries. It is a great starting point when - * building robust, powerful web applications using Vue and Laravel. - */ - - require('./bootstrap'); - - window.Vue = require('vue'); - - /** - * The following block of code may be used to automatically register your - * Vue components. It will recursively scan this directory for the Vue - * components and automatically register them with their "basename". - * - * Eg. ./components/ExampleComponent.vue -> - */ - - Vue.component('example-component', require('./components/ExampleComponent.vue')); - - /** - * Next, we will create a fresh Vue application instance and attach it to - * the page. Then, you may begin adding components to this application - * or customize the JavaScript scaffolding to fit your unique needs. - */ - - const app = new Vue({ - el: '#app' -}); +require('./bootstrap'); diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index de60a86..6922577 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,40 +1,14 @@ - window._ = require('lodash'); /** - * We'll load jQuery and the Bootstrap jQuery plugin which provides support - * for JavaScript based Bootstrap features such as modals and tabs. This - * code may be modified to fit the specific needs of your application. + * We'll load the axios HTTP library which allows us to easily issue requests + * to our Laravel back-end. This library automatically handles sending the + * CSRF token as a header based on the value of the "XSRF" token cookie. */ -try { - window.Popper = require('popper.js').default; - window.$ = window.jQuery = require('jquery'); - require('bootstrap'); - } catch (e) {} - - /** - * We'll load the axios HTTP library which allows us to easily issue requests - * to our Laravel back-end. This library automatically handles sending the - * CSRF token as a header based on the value of the "XSRF" token cookie. - */ - - window.axios = require('axios'); - window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; +window.axios = require('axios'); - /** - * Next we will register the CSRF Token as a common header with Axios so that - * all outgoing HTTP requests automatically have it attached. This is just - * a simple convenience so we don't have to attach every token manually. - */ - - let token = document.head.querySelector('meta[name="csrf-token"]'); - - if (token) { - window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; - } else { - console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); - } +window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; /** * Echo exposes an expressive API for subscribing to channels and listening @@ -42,9 +16,13 @@ try { * allows your team to easily build robust real-time web applications. */ -// import Echo from "laravel-echo" +// import Echo from 'laravel-echo'; + +// window.Pusher = require('pusher-js'); // window.Echo = new Echo({ // broadcaster: 'pusher', -// key: 'your-pusher-key' +// key: process.env.MIX_PUSHER_APP_KEY, +// cluster: process.env.MIX_PUSHER_APP_CLUSTER, +// forceTLS: true // }); diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php index bf6caf6..fac4841 100644 --- a/resources/lang/en/passwords.php +++ b/resources/lang/en/passwords.php @@ -18,5 +18,5 @@ '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.", - + 'throttled' => 'Please wait before retrying.', ]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index f1b54f4..75c2f8d 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -90,6 +90,7 @@ 'not_in' => 'The selected :attribute is invalid.', 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', + 'password' => 'The password is incorrect.', 'present' => 'The :attribute field must be present.', 'regex' => 'The :attribute format is invalid.', 'required' => 'The :attribute field is required.', diff --git a/resources/sass/app.scss b/resources/sass/app.scss index 35ce2dc..8337712 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -1,9 +1 @@ - -// Fonts -@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600); - -// Variables -@import "variables"; - -// Bootstrap -@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; +//