I would like to ask you to transfer headre to token and then Could not get any response.

routing:

 //
    Route::post("api/:version/address$","api/:version.Address/createOrUpdateAddress");

constroller:

//create Or update userAddress
    public function createOrUpdateAddress() {
//        (new AddressNew())->goCheck();
        $validate = new AddressNew();
        $validate->goCheck();
        // Tokenuid
        // uid,,else throw error
        //
        // or

        $uid = TokenService::getCurrentUID();

        $user = UserModel::get($uid);
        if (!$user) {
            throw new UserException();
        }

        $dataArray = $validate->getDateByRule(input("post."));

        $userAddress = $user->address;
        if (!$userAddress) {
            $user->address()->save($dataArray);
        }else{
            $user->address->save($dataArray); //!
        }
        return new SuccessMessage();
        $token = Request::instance()->header("token");
        return $token;
    }


controller:


token 27b61d0911c476f1318a0511723ac641



token
116f13

Jul.06,2022

has been solved, the coding problem


this problem of the landlord is very simple, as long as you are willing to charge money can be solved, charging money will make you stronger.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b404c9-2c50c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b404c9-2c50c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?