Answers for "check date time after laravel"

PHP
0

validate time in laravel

public function store(Illuminate\Http\Request $request)
{
    $this->validate($request, [
        'time_start' => 'date_format:H:i',
        'time_end' => 'date_format:H:i|after:time_start',
    ]);

    // do other stuff
}
Posted by: Guest on June-17-2021
0

how check the time of operation in laravel

$timeStart = microtime(true);

App::finish(function() use ($timeStart) {
    $diff = microtime(true) - $timeStart;
    $sec = intval($diff);
    $micro = $diff - $sec;
    Log::debug(Request::getMethod() . "[" . Request::url() . "] Time: " . round($micro * 1000, 4) . " ms");
});
Posted by: Guest on August-02-2021

Browse Popular Code Answers by Language