jeudi 28 mars 2019

How to pass specific time through postman

I get the following error I am trying to hit an API where that takes the title from the user and its cook time and apply to the decomposed time of 12 hours but the problem is I am using postman and have no clue to send date or time through postman for cook time

I tried sending request of time also used dd to check whether the value that I am inserting is going in the proper format or not

$post =  Auth::user()->posts()->create([
                'user_id' => Auth::id(),
                'title' => $request->title,
                'cooked_time' => $request->cooked_time,
                $cooked_time = date('h:i:s',$request->cooked_time),
                dd($cooked_time),
                'dispose_time' => date('h:i:s',strtotime("+12 hours", strtotime($cooked_time))),

I want to pass cooked time of a food that a typical user would have passed and add 12 hours to it



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire