io238 / laravel-iso-countries

Ready-to-use Laravel models and relations for country (ISO 3166), language (ISO 639-1), and currency (ISO 4217) information with multi-language support.
MIT License
38 stars 9 forks source link

infinite loop when casting #3

Open ZARk-be opened 1 year ago

ZARk-be commented 1 year ago

Hello

I'm getting this error when trying to cast in my model

ERROR Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php on line 73.

i don't have any classes called Language or Country or Currency Only thing is the model i'm using has the following fields

`class PeopleSpokenLanguage extends Model { use HasFactory;

protected $casts = [
    'language' => Language::class,
    'accent' => Country::class

];

}`