generated from archtechx/template
-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hi there. First of all, thank you for your work on this package, I loved using it so far.
Unfortunately, I'm running into an issue when using default attributes.
class User
{
use Fluent;
public int $amount = 20;
}
Or as documented in the Laravel Docs.
class User
{
use Fluent;
public int $amount;
public $attributes = [
'amount' => 20,
];
}
Using either of these snippets, whenever retrieving a User from the database the amount
property will always have the default value. Even when the amount
column is set to anything else than the default value.
$user = User::first();
echo $user->amount;
// 20
I haven't been able to find why this is happening exactly, but I still wanted to report this issue. Maybe we can find a fix, or we should add this to the documentation as an incompatibility.
Metadata
Metadata
Assignees
Labels
No labels