Replies: 1 comment
-
Hi, @rabol The If you want to use the
Here's an example: class Ticket extends \Coderflex\LaravelTicket\Models\Ticket
{
....
protected function booted()
{
static::created(function (Model $model) {
$model->uuid = Str::uuid();
});
}
// to make the uuid primary by default
public function getRouteKeyName()
{
return 'uuid';
}
} Or you can use the Route::get('/tickets/{ticket:uuid}', ...); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I was wondering when th uuid on the ticket get initialised ?
In the readme there is this:
Beta Was this translation helpful? Give feedback.
All reactions