DEV Community

Discussion on: Easily use UUIDs in Laravel

Collapse
 
faridsa profile image
farid

Hi Wilbur, nice point. I'm using phpStan to check my code and the trait fires an error in following line:
$model->{$model->getKeyName()} = (string) Str::uuid();

Error:
Cannot cast Ramsey\Uuid\UuidInterface to string