webpatser/laravel-uuid

Call to undefined method Webpatser\Uuid\UuidFacade::generate() in Laravel 5.5

dees040 opened this issue · 8 comments

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;
});

@dees040 Same issue, Did you get any solution for this?

I have the same issue

I will look into it :-)

Done. Fixed in version 2.1.

"webpatser/laravel-uuid": "^2.0"

small update: Version 3.0 is laravel 5.5 ready, and php 7 only!

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

Did you import the class?

Yes, and it was like below

<?php 
use Uuid;