This commit is contained in:
Maxime Renou 2020-05-11 18:19:43 +02:00
parent 6dbc2ee43e
commit d44078f393
2 changed files with 4 additions and 2 deletions

View File

@ -60,10 +60,10 @@ class Connect
];
if ($auth === true) {
$config['Authorization'] = 'Bearer ' . $this->getAccessToken();
$config['headers']['Authorization'] = 'Bearer ' . $this->getAccessToken();
}
elseif ($auth !== false) {
$config['Authorization'] = 'Bearer ' . $auth;
$config['headers']['Authorization'] = 'Bearer ' . $auth;
}
if (!is_null($data)) {

View File

@ -14,6 +14,7 @@ trait HasConnectSync
{
$record = new self;
$record->fill($data);
$record->id = $id;
$record->save();
return true;
}
@ -22,6 +23,7 @@ trait HasConnectSync
{
$record = self::find($id) ?? new self;
$record->fill($data);
$record->id = $id;
$record->save();
return true;
}