chore: Update to Laravel 9.0

This commit is contained in:
Bruno F. Fontes 2022-11-12 19:00:35 -03:00
parent 11162a9ffa
commit 2cd7ab11fa
Signed by: brunofontes
GPG Key ID: 4DAA810052CF68B6
34 changed files with 58508 additions and 15142 deletions

View File

@ -2,7 +2,7 @@
namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
@ -19,5 +19,10 @@ class TrustProxies extends Middleware
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}

View File

@ -5,9 +5,10 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^7.3.0",
"php": "^8.0.2",
"fideloper/proxy": "^4.4",
"laravel/framework": "^8.0",
"inertiajs/inertia-laravel": "^0.6.3",
"laravel/framework": "^9.19.0",
"laravel/helpers": "^1.4",
"laravel/tinker": "^2.4.1",
"laravel/ui": "^3.0"
@ -17,9 +18,9 @@
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.0",
"nunomaduro/collision": "^6.1",
"nunomaduro/larastan": "^0.7.4",
"nunomaduro/phpinsights": "^1.14",
"nunomaduro/phpinsights": "*",
"phpstan/phpstan": "^0.12.85",
"phpunit/phpunit": "^9.0"
},

3562
composer.lock generated

File diff suppressed because it is too large Load Diff

14472
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +1,24 @@
{
"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"
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"axios": "^0.21",
"axios": "^1.1.3",
"bootstrap": "^4.6.0",
"cross-env": "^5.2.1",
"jquery": "^3.5.1",
"laravel-mix": "^6.0.18",
"laravel-vite-plugin": "^0.7.0",
"lodash": "^4.17.21",
"popper.js": "^1.16.1",
"postcss": "^8.4.19",
"resolve-url-loader": "^3.1.3",
"sass": "^1.32.12",
"sass": "^1.56.1",
"sass-loader": "^8.0.2",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12"
"vite": "^3.2.3"
},
"dependencies": {
"webpack": "^5.75.0"
}
}

1
public/build/assets/app.95ac02f4.js vendored Normal file
View File

@ -0,0 +1 @@
require("./bootstrap");

View File

@ -0,0 +1,7 @@
{
"resources/js/app.js": {
"file": "assets/app.95ac02f4.js",
"src": "resources/js/app.js",
"isEntry": true
}
}

9252
public/css/app.css vendored

File diff suppressed because one or more lines are too long

46234
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1 @@
{
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css"
}
{}

10
resources/js/app.js vendored
View File

@ -7,7 +7,7 @@
require('./bootstrap');
window.Vue = require('vue');
// window.Vue = require('vue');
/**
* Next, we will create a fresh Vue application instance and attach it to
@ -15,8 +15,8 @@ window.Vue = require('vue');
* or customize the JavaScript scaffolding to fit your unique needs.
*/
Vue.component('example-component', require('./components/ExampleComponent.vue'));
// Vue.component('example-component', require('./components/ExampleComponent.vue'));
const app = new Vue({
el: '#app'
});
// const app = new Vue({
// el: '#app'
// });

View File

@ -1,23 +0,0 @@
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card card-default">
<div class="card-header">Example Component</div>
<div class="card-body">
I'm an example component.
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
console.log('Component mounted.')
}
}
</script>

27
vite.config.js vendored Normal file
View File

@ -0,0 +1,27 @@
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
// import react from '@vitejs/plugin-react';
// import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel([
// 'resources/css/app.css',
'resources/js/app.js',
]),
// react(),
// vue({
// template: {
// transformAssetUrls: {
// base: null,
// includeAbsolute: false,
// },
// },
// }),
],
resolve: {
alias: {
'@': '/resources/js'
}
}
});

15
webpack.mix.js vendored
View File

@ -1,15 +0,0 @@
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');