added UserFactory and UserTest.php

This commit is contained in:
Peter Papp
2021-02-25 17:35:51 +01:00
parent ac38d35ae1
commit 2f332197e6
15 changed files with 97 additions and 73 deletions

27
app/Models/Zip.php Normal file
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();
});
}
}