Categoria: Laravel

0

10 Laravel Eloquent tips and tricks

1. Automatic Model Validation It can sometimes be convenient to automatically validate your model when it gets created or updated. This is very easily achieved with Laravel through the use of Model events. class...

0

LaraAdmin 1.0

Laravel PHP Framework “php”: “>=7.0.0” “laravel/framework”: “5.5.*”, LaraAdmin 1.0 LaraAdmin 1.0 composer install php artisan la:install sudo chmod -R 777 storage/ bootstrap/ database/migrations/ Enable Less to CSS (Optional) If you want to make UI...

0

Laravel Eloquent – Attach vs Sync

Qual é a diferença entre attach () e sync () no Eloquent ORM? attach(): Insert related models when working with many-to-many relations No array parameter is expected Example: $user = User::find(1); $user->roles()->attach(1); sync() Similar...

0

Laravel 5.7 get ip address

Neste artigo, eu vou deixar você saber como obter o endereço IP de uma solicitação em laravel 5.7. In this article, I will let you know how to get ip address from a request...

Base de acidentes da PRF e Detran nas estradas no ano de 2017.

Um desenvolvedor comentou, então corri atrás e fiz também, é importante para saber como esta os índices no Brasil. Logo posto 2018 e parcial de 2019. Bibliotecas: https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css https://use.fontawesome.com/releases/v5.8.1/css/all.css Baixei no site PRF um...