You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function __construct(
readonly public string $email,
readonly public string $password,
readonly public string $first_name,
readonly public string $last_name,
#[DataCollectionOf(ServiceData::class)]
readonly public DataCollection $personal_service_data,
) {
}
}`
And this is my ServiceData Class
`
class PersonalServiceData extends Data implements DataObject
{
public function __construct(
readonly public string $dob,
readonly public string $state,
readonly public string $gender,
) {
}
}`
This is throwing me this following error:
Spatie\LaravelData\Exceptions\CannotFindDataClass: Class given does not implement DataObject::class in file /vendor/spatie/laravel-data/src/Attributes/DataCollectionOf.php on line 17
I have tried implementing the DataObject Class to both of these classes but the issue was not fixed.
The text was updated successfully, but these errors were encountered:
This is what I'm doing
`
class SignupData extends Data
{
}`
And this is my ServiceData Class
`
class PersonalServiceData extends Data implements DataObject
{
}`
This is throwing me this following error:
Spatie\LaravelData\Exceptions\CannotFindDataClass: Class given does not implement
DataObject::class
in file /vendor/spatie/laravel-data/src/Attributes/DataCollectionOf.php on line 17I have tried implementing the DataObject Class to both of these classes but the issue was not fixed.
The text was updated successfully, but these errors were encountered: