Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit 761c109

Browse files
committed
Update to Laravel v6
1 parent ac44668 commit 761c109

16 files changed

+102
-120
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ trim_trailing_whitespace = true
1111
[*.md]
1212
trim_trailing_whitespace = false
1313

14-
[*.yml]
14+
[*.{yml,yaml}]
1515
indent_size = 2

app/Http/Kernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class Kernel extends HttpKernel
7272
\Illuminate\Session\Middleware\StartSession::class,
7373
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
7474
\Framework\Http\Middleware\Authenticate::class,
75+
\Illuminate\Routing\Middleware\ThrottleRequests::class,
7576
\Illuminate\Session\Middleware\AuthenticateSession::class,
7677
\Illuminate\Routing\Middleware\SubstituteBindings::class,
7778
\Illuminate\Auth\Middleware\Authorize::class,

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"license": "MIT",
66
"type": "project",
77
"require": {
8-
"php": ">=7.1.3",
9-
"laravel/framework": "5.8.*",
10-
"lucid-arch/laravel-foundation": "5.8.*",
11-
"laravel/tinker": "^1.0",
12-
"fideloper/proxy": "~4.0"
8+
"php": "^7.2",
9+
"fideloper/proxy": "~4.0",
10+
"laravel/framework": "^6.2",
11+
"laravel/helpers": "^1.1",
12+
"laravel/tinker": "^2.0",
13+
"lucid-arch/laravel-foundation": "^6.0"
1314
},
1415
"require-dev": {
1516
"fzaninotto/faker": "^1.4",
1617
"mockery/mockery": "^1.0",
1718
"nunomaduro/collision": "^3.0",
18-
"phpunit/phpunit": "^7.5",
19+
"phpunit/phpunit": "^8.0",
1920
"symfony/css-selector": "~4.0",
2021
"symfony/dom-crawler": "~4.0",
21-
"lucid-arch/laravel-console": "5.8.*",
22-
"beyondcode/laravel-dump-server": "^1.0",
23-
"filp/whoops": "^2.0"
22+
"facade/ignition": "^1.4",
23+
"lucid-arch/laravel-console": "^6.0"
2424
},
2525
"autoload": {
2626
"classmap": [

config/logging.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Monolog\Handler\NullHandler;
34
use Monolog\Handler\StreamHandler;
45
use Monolog\Handler\SyslogUdpHandler;
56

@@ -87,6 +88,11 @@
8788
'driver' => 'errorlog',
8889
'level' => 'debug',
8990
],
91+
92+
'null' => [
93+
'driver' => 'monolog',
94+
'handler' => NullHandler::class,
95+
],
9096
],
9197

9298
];

config/mail.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
| sending of e-mail. You may specify which one you're using throughout
1212
| your application here. By default, Laravel is setup for SMTP mail.
1313
|
14-
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
15-
| "sparkpost", "log", "array"
14+
| Supported: "smtp", "sendmail", "mailgun", "ses",
15+
| "log", "array"
1616
|
1717
*/
1818

config/queue.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
*/
8181

8282
'failed' => [
83+
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
8384
'database' => env('DB_CONNECTION', 'mysql'),
8485
'table' => 'failed_jobs',
8586
],

config/services.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
|--------------------------------------------------------------------------
99
|
1010
| This file is for storing the credentials for third party services such
11-
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
11+
| as Stripe, Mailgun and others. This file provides a sane
1212
| default location for this type of information, allowing packages
1313
| to have a conventional place to find your various credentials.
1414
|
@@ -30,10 +30,6 @@
3030
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
3131
],
3232

33-
'sparkpost' => [
34-
'secret' => env('SPARKPOST_SECRET'),
35-
],
36-
3733
'stripe' => [
3834
'model' => Framework\User::class,
3935
'key' => env('STRIPE_KEY'),
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateFailedJobsTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('failed_jobs', function (Blueprint $table) {
17+
$table->bigIncrements('id');
18+
$table->text('connection');
19+
$table->text('queue');
20+
$table->longText('payload');
21+
$table->longText('exception');
22+
$table->timestamp('failed_at')->useCurrent();
23+
});
24+
}
25+
26+
/**
27+
* Reverse the migrations.
28+
*
29+
* @return void
30+
*/
31+
public function down()
32+
{
33+
Schema::dropIfExists('failed_jobs');
34+
}
35+
}

package.json

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
{
2-
"private": true,
3-
"scripts": {
4-
"dev": "npm run development",
5-
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6-
"watch": "npm run development -- --watch",
7-
"watch-poll": "npm run watch -- --watch-poll",
8-
"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",
9-
"prod": "npm run production",
10-
"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"
11-
},
12-
"devDependencies": {
13-
"axios": "^0.18",
14-
"bootstrap": "^4.0.0",
15-
"popper.js": "^1.12",
16-
"cross-env": "^5.1",
17-
"jquery": "^3.2",
18-
"laravel-mix": "^2.0",
19-
"lodash": "^4.17.4",
20-
"vue": "^2.5.17"
21-
}
2+
"private": true,
3+
"scripts": {
4+
"dev": "npm run development",
5+
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6+
"watch": "npm run development -- --watch",
7+
"watch-poll": "npm run watch -- --watch-poll",
8+
"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",
9+
"prod": "npm run production",
10+
"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"
11+
},
12+
"devDependencies": {
13+
"axios": "^0.19",
14+
"cross-env": "^5.1",
15+
"laravel-mix": "^4.0.7",
16+
"lodash": "^4.17.13",
17+
"resolve-url-loader": "^2.3.1",
18+
"sass": "^1.15.2",
19+
"sass-loader": "^7.1.0"
20+
}
2221
}

phpunit.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4+
backupGlobals="false"
35
backupStaticAttributes="false"
46
bootstrap="bootstrap/autoload.php"
57
colors="true"

readme.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,21 @@ If you prefer a video, watch the announcement of The Lucid Architecture at Larac
2929

3030
## Installation
3131

32-
### 5.8
32+
### 6
3333
To start your project with Lucid right away, run the following command:
3434

3535
```
3636
composer create-project lucid-arch/laravel my-project
3737
```
3838

39-
This will give you a Laravel 5.8 installation with Lucid out-of-the-box. If you wish to download other versions of Laravel you may specify it as well:
39+
This will give you a Laravel 6 installation with Lucid out-of-the-box. If you wish to download other versions of Laravel you may specify it as well:
40+
41+
##### 5.8
42+
```
43+
composer create-project lucid-arch/laravel=5.8.x my-project-5.8
44+
```
45+
46+
> Literally 5.8.x and not 5.8.0 or 5.8.1...
4047
4148
##### 5.7
4249
```
@@ -50,8 +57,6 @@ composer create-project lucid-arch/laravel=5.7.x my-project-5.7
5057
composer create-project lucid-arch/laravel=5.6.x my-project-5.6
5158
```
5259

53-
> Literally 5.6.x and not 5.6.0 or 5.6.1...
54-
5560
##### 5.5
5661
```
5762
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
6267
composer create-project lucid-arch/laravel=5.4.x my-project-5.4
6368
```
6469

65-
##### 5.3
66-
```
67-
composer create-project lucid-arch/laravel=5.3.x my-project-5.3
68-
```
69-
7070
## Introduction
7171

7272
### Directory Structure

resources/js/app.js

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1 @@
1-
2-
/**
3-
* First we will load all of this project's JavaScript dependencies which
4-
* includes Vue and other libraries. It is a great starting point when
5-
* building robust, powerful web applications using Vue and Laravel.
6-
*/
7-
8-
require('./bootstrap');
9-
10-
window.Vue = require('vue');
11-
12-
/**
13-
* The following block of code may be used to automatically register your
14-
* Vue components. It will recursively scan this directory for the Vue
15-
* components and automatically register them with their "basename".
16-
*
17-
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
18-
*/
19-
20-
Vue.component('example-component', require('./components/ExampleComponent.vue'));
21-
22-
/**
23-
* Next, we will create a fresh Vue application instance and attach it to
24-
* the page. Then, you may begin adding components to this application
25-
* or customize the JavaScript scaffolding to fit your unique needs.
26-
*/
27-
28-
const app = new Vue({
29-
el: '#app'
30-
});
1+
require('./bootstrap');

resources/js/bootstrap.js

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,28 @@
1-
21
window._ = require('lodash');
32

43
/**
5-
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
6-
* for JavaScript based Bootstrap features such as modals and tabs. This
7-
* code may be modified to fit the specific needs of your application.
4+
* We'll load the axios HTTP library which allows us to easily issue requests
5+
* to our Laravel back-end. This library automatically handles sending the
6+
* CSRF token as a header based on the value of the "XSRF" token cookie.
87
*/
9-
try {
10-
window.Popper = require('popper.js').default;
11-
window.$ = window.jQuery = require('jquery');
12-
require('bootstrap');
13-
} catch (e) {}
14-
15-
/**
16-
* We'll load the axios HTTP library which allows us to easily issue requests
17-
* to our Laravel back-end. This library automatically handles sending the
18-
* CSRF token as a header based on the value of the "XSRF" token cookie.
19-
*/
20-
21-
window.axios = require('axios');
228

23-
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
9+
window.axios = require('axios');
2410

25-
/**
26-
* Next we will register the CSRF Token as a common header with Axios so that
27-
* all outgoing HTTP requests automatically have it attached. This is just
28-
* a simple convenience so we don't have to attach every token manually.
29-
*/
30-
31-
let token = document.head.querySelector('meta[name="csrf-token"]');
32-
33-
if (token) {
34-
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
35-
} else {
36-
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
37-
}
11+
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
3812

3913
/**
4014
* Echo exposes an expressive API for subscribing to channels and listening
4115
* for events that are broadcast by Laravel. Echo and event broadcasting
4216
* allows your team to easily build robust real-time web applications.
4317
*/
4418

45-
// import Echo from "laravel-echo"
19+
// import Echo from 'laravel-echo';
20+
21+
// window.Pusher = require('pusher-js');
4622

4723
// window.Echo = new Echo({
4824
// broadcaster: 'pusher',
49-
// key: 'your-pusher-key'
25+
// key: process.env.MIX_PUSHER_APP_KEY,
26+
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
27+
// forceTLS: true
5028
// });

resources/lang/en/passwords.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
'sent' => 'We have e-mailed your password reset link!',
1919
'token' => 'This password reset token is invalid.',
2020
'user' => "We can't find a user with that e-mail address.",
21-
21+
'throttled' => 'Please wait before retrying.',
2222
];

resources/lang/en/validation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
'not_in' => 'The selected :attribute is invalid.',
9191
'not_regex' => 'The :attribute format is invalid.',
9292
'numeric' => 'The :attribute must be a number.',
93+
'password' => 'The password is incorrect.',
9394
'present' => 'The :attribute field must be present.',
9495
'regex' => 'The :attribute format is invalid.',
9596
'required' => 'The :attribute field is required.',

resources/sass/app.scss

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
2-
// Fonts
3-
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
4-
5-
// Variables
6-
@import "variables";
7-
8-
// Bootstrap
9-
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
1+
//

0 commit comments

Comments
 (0)