Closed AEK-BKF closed 3 years ago
Like the docs say, every object in the package must be associated with an entity. That means that before creating anything you must first create a entity object and associate it with the current logged in user.
Thanks for reply, Yes, I've already created the entity, currencies, vats, ..etc So, if I create new account like this :
$bankAccount = Account::create([
'name' => "Sales Account",
'account_type' => Account::BANK,
]);
It throws the error, Even if I do like this :
$bankAccount = Account::create([
'name' => "Sales Account",
'account_type' => Account::BANK,
'currency_id' => $currency_id,
'entity_id' => $entity_id,
]);
Verify two things:
1- Yes 2- Yes
Then it must be an evironment issue, not a problem with the package itself. Try creating a new session and starting from scratch.
I'm really sorry, I deleted entity and create new one without assigning it to User.... Oh my Bad .... Sorry ....
Hello, I have issue when I create any record for Account, VAT, ... etc
auth()->user()->entity
returns nullLaravel version 6.18.40 PHP version 7.4.10