1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/app/Ninja/Repositories/NinjaRepository.php
2018-03-16 12:15:16 +02:00

23 lines
448 B
PHP

<?php
namespace App\Ninja\Repositories;
use App\Models\Account;
class NinjaRepository
{
public function updatePlanDetails($clientPublicId, $data)
{
$account = Account::whereId($clientPublicId)->first();
if (! $account) {
return;
}
$company = $account->company;
$company->fill($data);
$company->plan_expires = $company->plan_expires ?: null;
$company->save();
}
}