Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Marcolino922's avatar

How does it work addMinutes?

Hi, I wanted to ask for more information to those who know more. In Laravel 7, what should be the function of addMinutes? Is it possible to set it to upload images? Are they automatically deleted from the database? Thanks for the sure clarification.

0 likes
7 replies
Sinnbeck's avatar

Are you talking about temporary urls on s3?

Snapey's avatar

bananas are output via the fruit-loops

1 like
Marcolino922's avatar

I thank everyone for the answers, even those who joke about it, ma potrei parlare nella mia lingua madre, in Italiano magari, no?

Anyway, I'm just getting informed, I'm trying to learn and I wanted to understand first instead of doing tests directly.

I saw this code, to simplify my request, I ask then, what is the output of this code?

public function postStartCountdown($stream)
 {
     $counter = AnnouncementCounter::getByStream($stream);
     $name = Input::get('name');
     $endTime = new Carbon();
     $endTime->addMinutes(10);
     $counter->ends_at = $endTime;
     $counter->save();
     $this->broadcast(array('stream' => $stream, 'type' => 'notify', 'text' => $name, 'expires' => $endTime->timestamp));
     Flash::success('Отчет завершится в ' . $endTime->format('H:i:s'));
 }
Sinnbeck's avatar

Can you add ``` on the line before the code to format it :) And sorry I dont speak italian :)

tykus's avatar

There is no output from the provided code.

As mentioned previously, the addMinutes method is from Carbon, and like it says add the given number of minutes to a Carbon instance. Your $endTime is initialized with the current time (UTC by default unless the application timezone was modified in config/app.php), so adding 10 minutes will modify the $endTime to 10 minutes into the future.

1 like
Snapey's avatar

Your english is fine, but was short of context

Please or to participate in this conversation.