Answer the question
In order to leave comments, you need to log in
How to properly store data and process it?
Good evening!
I want to implement duration time of video or music for example.
In the database, I will store the duration in seconds in the big integer type . So it was decided, since my application is multilingual.
Question about processing before returning data to the end client.
For example, does Carbon have a method to get from the number of seconds - minutes of a second or hour of a minute of a second ?
How to implement it correctly?
Answer the question
In order to leave comments, you need to log in
CarbonInterval::seconds($secondsAsBigint)->cascade()->forHumans();
foreach ($array as $key => $val) {
if(is_array($val)) {
sort($array[$key]);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question