I'm using Laravel Eloquent for my posts table and using the UUID for my table's primary key. But after saving the model I can't get the ID of it, although all the values are correctly inserted in database.
$post = new App\Post();
$post->uuid = \Webpatser\Uuid\Uuid::generate();
$post->save();
dd($post->uuid); //return null or 0
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire