skip to Main Content

Unsupported operand types: IlluminateSupportCarbon – IlluminateSupportCarbon – Laravel

I have made this method for sending a temporary code to user's mobile phone number for verifying his account: public function signInWithToken() { if(Session::has('nextStep') && Session::has('foundUser')) { $user = User::where('usr_mobile_phone', Session::get('foundUser'))->first(); if(Session::has('codeSent')){ $nowTime = now(); $sentTime = Session::get('codeSent'); if($nowTime >=…

VIEW QUESTION

PHP – get closest date from array – Laravel

I want to get closest date from $search_date if is not same values in $array['date']. If is same value in $array['date'] I want all array. Format date is 'Y-m-d'. Example 1: $search_date = '2022-12-08'; $array = [{"price":"200","date":"2022-12-12"},{"price":"50","date":"2022-12-10"},{"price":"100","date":"2022-12-10"}] Return should be:…

VIEW QUESTION
Back To Top
Search