I wanted to pass the custom data through postman but the problem is how do I parse date and time in a field at time.
initially, I tried strtotime function but I wanted it along with the date
This is my post Api
$post = Auth::user()->posts()->create([
'user_id' => Auth::id(),
'post_id' => rand(),
'title' => $request->title,
'time' => strtotime($request->time),
]);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire