Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .docker/adminer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM adminer:latest

USER root
2 changes: 1 addition & 1 deletion .docker/mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM mariadb:10.7.1
FROM mysql:8.0

RUN usermod -u 1000 mysql
2 changes: 1 addition & 1 deletion .docker/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.15.0-alpine
FROM nginx:1.23.0-alpine

RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx.conf /etc/nginx/conf.d
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.3.6-fpm-alpine3.9
FROM php:8.1.8-fpm-alpine

RUN apk add --no-cache shadow openssl bash mysql-client nodejs-current npm git
RUN docker-php-ext-install pdo pdo_mysql
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ $ docker-compose up
http://localhost:8000
```

## Apéndice
#### Acesse o Adminer no browser

Nosso aluno [Yuri Koster](https://github.com/yurikoster1) criou outra opção do repositório organizando melhor os arquivos Docker, se quiserem utilizar basta clonar o branch ```more_organized```.
```
http://localhost:8090
```

## Apêndice

Este repositório está atualizado para versão 9.0 do Laravel, 8.1.8 do PHP, MySQL 8.0, NGINX 1.23.0, Adminer(Para
Administração do MySQL via browser).
14 changes: 3 additions & 11 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

use Throwable;
class Handler extends ExceptionHandler
{
/**
Expand Down Expand Up @@ -32,19 +32,11 @@ class Handler extends ExceptionHandler
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
public function report(Throwable $exception) // <-- USE Throwable HERE
{
parent::report($exception);
}

/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
public function render($request, Throwable $exception) // AND HERE
{
return parent::render($request, $exception);
}
Expand Down
7 changes: 6 additions & 1 deletion app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@
],
"license": "MIT",
"require": {
"php": "^7.2",
"fideloper/proxy": "^4.0",
"laravel/framework": "~6.18",
"laravel/tinker": "^1.0",
"laravel/ui": "^1.0"
"php": "^8.1.8",
"fideloper/proxy": "^4.4",
"laravel/framework": "^9.0",
"laravel/passport": "^10.4",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.0.1"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.3",
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.4",
"fakerphp/faker": "^1.19",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.0",
"spatie/laravel-ignition": "^1.0"
},
"config": {
"optimize-autoloader": true,
Expand Down
Loading