Posts by Modscleo4 • 26 points
2 posts
-
1
votes2
answers337
viewsA: Laravel 5.8 find with column name other than "id", how to do?
The find method of Eloquent searches for the primary key. If you want to search for another column, use the ->Where method() public function show($cod) { $produto = Produtos::where('codigo',…
-
0
votes1
answer349
viewsA: Laravel - Sum date from date saved in database
From what I understand, you want to add x days to a bank date $dataPrescricao = Carbon::createFromFormat("!Y-m-d", $dataSinistro) // Cria uma instância do Carbon com a data do banco…