This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Stage 1: Base PHP ### | |
FROM php:7.4-fpm-alpine as php | |
COPY --from=composer /usr/local/bin /usr/local/bin/ | |
RUN apk add --update \ | |
curl-dev \ | |
libcurl \ | |
libpng \ | |
freetype \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version; '3.7' | |
services: | |
php: | |
volumes: | |
- ... | |
other_settings: | |
- ... | |
enviroment: | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /var/www/symfony/public; | |
location /api-docs/ { | |
} | |
location / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker run --network host --rm -e HOME="$HOME" -u "$(id -u)":"$(id -g)" -v "$HOME":"$HOME" -w "$PWD" php:8.1-fpm php "$@" | |
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function rules(): array | |
{ | |
return [ | |
'password' => [ | |
'required', | |
Password::min(8)->letters()->numbers()->mixedCase() | |
], | |
'password_confirm' => [ | |
'same:password', | |
'required', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $query é um Eloquent\Builder | |
$query = parent::newQuery(); | |
$query->with('relation') // with() é um método de Eloquent\Builder | |
->join( // join() é método de Query\Builder | |
'table2', | |
'table1.user_id', | |
'table2.another_user_id' | |
) | |
->where('table2.another_user_id', $parametro); // where() está em ambos, Query\Builder e Eloquent\Builder |