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

Commit

Permalink
Update to Laravel v6
Browse files Browse the repository at this point in the history
  • Loading branch information
harris21 committed Nov 30, 2019
1 parent ac44668 commit 761c109
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

[*.yml]
[*.{yml,yaml}]
indent_size = 2
1 change: 1 addition & 0 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
6 changes: 6 additions & 0 deletions config/logging.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;

Expand Down Expand Up @@ -87,6 +88,11 @@
'driver' => 'errorlog',
'level' => 'debug',
],

'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
],

];
4 changes: 2 additions & 2 deletions config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
|
*/

Expand Down
1 change: 1 addition & 0 deletions config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
*/

'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
Expand Down
6 changes: 1 addition & 5 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
|
Expand All @@ -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'),
Expand Down
35 changes: 35 additions & 0 deletions database/migrations/2019_09_28_130641_create_failed_jobs_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->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');
}
}
39 changes: 19 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
4 changes: 3 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
Expand Down
18 changes: 9 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,21 @@ If you prefer a video, watch the announcement of The Lucid Architecture at Larac

## Installation

### 5.8
### 6
To start your project with Lucid right away, run the following command:

```
composer create-project lucid-arch/laravel my-project
```

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:
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:

##### 5.8
```
composer create-project lucid-arch/laravel=5.8.x my-project-5.8
```

> Literally 5.8.x and not 5.8.0 or 5.8.1...
##### 5.7
```
Expand All @@ -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
Expand All @@ -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
Expand Down
31 changes: 1 addition & 30 deletions resources/js/app.js
Original file line number Diff line number Diff line change
@@ -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 -> <example-component></example-component>
*/

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');
44 changes: 11 additions & 33 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,28 @@

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
* for events that are broadcast by Laravel. Echo and event broadcasting
* 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
// });
2 changes: 1 addition & 1 deletion resources/lang/en/passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
];
1 change: 1 addition & 0 deletions resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
10 changes: 1 addition & 9 deletions resources/sass/app.scss
Original file line number Diff line number Diff line change
@@ -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";
//

0 comments on commit 761c109

Please sign in to comment.