mercredi 29 janvier 2020

how to submit form Automatically, when it time is up?

Am trying to soft delete the post when the timeout, but unable to do that automatically..! Here's My Code:

@php
$date=str_replace('-', '/', $post->created_at);
$endDate=date('Y/m/d H:i:s',strtotime($date. ' + '.$post->post_days.' days'));
@endphp    
@if($endDate == 0)
<form action="">
<input type="text" name="postId" value="">
<button type="submit" >test</button>
</form>
@endif


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire