- zip implementation for users

This commit is contained in:
Peter Papp
2020-12-13 17:49:44 +01:00
parent 874b4bb768
commit 11873d06ff
16 changed files with 335 additions and 129 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Zip extends Model
{
protected $guarded = ['id'];
public $incrementing = false;
protected $keyType = 'string';
/**
* Generate uuid
*/
protected static function boot()
{
parent::boot();
static::creating(function ($model) {
$model->id = (string)Str::uuid();
});
}
}