Open dreamsbond opened 4 years ago
something like
protected $guarded = ['uuid'];
in laravel
and followed by the guarded field.
is it possible to achieve
class User extends Model
{
public static function boot()
{
parent::boot();
self::creating(function($model){
// ... code here
});
self::created(function($model){
// ... code here
});
self::updating(function($model){
// ... code here
});
self::updated(function($model){
// ... code here
});
self::deleting(function($model){
// ... code here
});
self::deleted(function($model){
// ... code here
});
}
}
like in laravel?
I would like to generate UUID automatically at the time of resource creating.
I have a scenario where the UUID should be being created or updated by the user. Is there any declaration exists for making the UUID only readable so to restrict user from creating and updating it?