Call to undefined method Webpatser\Uuid\UuidFacade::generate() in Laravel 5.5
dees040 opened this issue · 8 comments
dees040 commented
When upgrading Laravel from 5.4 to 5.5 I got the following error:
Call to undefined method Webpatser\\Uuid\\UuidFacade::generate()
I'm using 'Uuid' => Webpatser\Uuid\Uuid::class,
in my aliases.
My code:
static::creating(function ($model) {
$model->{$model->getKeyName()} = Uuid::generate()->string;
});
sebas-nicholls commented
I have the same issue
webpatser commented
I will look into it :-)
webpatser commented
Done. Fixed in version 2.1.
"webpatser/laravel-uuid": "^2.0"
webpatser commented
small update: Version 3.0 is laravel 5.5 ready, and php 7 only!
lakshmaji commented
Uuid is not found
error when trying to generate uuid from the controller
Uuid::generate(4);
Environment details
- Laravel 5.4
- PHP 7.1
- Uuid 3.0
webpatser commented
Did you import the class?
lakshmaji commented
Yes, and it was like below
<?php
use Uuid;