Support the ongoing development of Laravel.io →

PhillippOhlandt

Joined 3 May 2015

Statistics

Threads 1
Replies 10
Solutions 0
Articles 0

Eloquent float values be rounded

Hey, I have an existing database with float(10,2) fields in some tables. When I return Model::first(...

0 Likes
24 Replies
replied 9 years ago

Eloquent float values be rounded

I do not need the fillable array because I don't want to store entries in that table.

0 Likes
replied 9 years ago

Eloquent float values be rounded

And I am not. It's a very big (and old) database. Main system written in Zend Beta on a php 4.4.9 se...

0 Likes
replied 9 years ago

Eloquent float values be rounded

No that don't work! That is what I do the whole time! return Pharmacy::first(); //or find(1) ... Mo...

0 Likes
replied 9 years ago

Eloquent float values be rounded

Normal sql query gives me 2.95.

0 Likes
replied 9 years ago

Eloquent float values be rounded

neomerx: Tried it already, got "3".

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.