Posts by hernandev • 4,704 points
54 posts
-
3
votes2
answers744
viewsA: How to create a Grouped List in Laravel 4 from an entity with self-relationship
Say your model who inherits from the Eloquent is called Items, then to recover all the records, you can use: Itens::all() This returns the data but does not solve the problem, you could even try to…
-
18
votes5
answers20362
viewsA: Is there an algorithm to check the validity of a ID number in Brazil using check digits?
Not Standard, each state is Free on RG Issue, the format varies from state to state, if it is really necessary to validate RG, do as most I see, ask for the photo or scan of the document. For all…
-
22
votes2
answers32948
viewsA: How to send SMS for free using PHP?
In the old days you could run it using the Google Agenda, but always for the same number checked, I used for a while to alert system. If you really need to send SMS from your system there are two…
-
29
votes6
answers59467
viewsA: How to calculate the difference between two dates?
You can also use the Mysql function DATEDIFF which is quite simple, see the examples: SELECT DATEDIFF('2013-01-01','2012-03-01') In the above case, I passed two dates "manually", can be two fields:…