mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-27 18:40:39 +00:00
change language id to uuid
This commit is contained in:
+14
-1
@@ -3,14 +3,27 @@
|
||||
namespace App;
|
||||
|
||||
use App\LanguageString;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Language extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $keyType = 'string';
|
||||
|
||||
public $incrementing = false ;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::creating(function($model) {
|
||||
$model->id = Str::uuid();
|
||||
});
|
||||
}
|
||||
|
||||
public function languegeStrings()
|
||||
{
|
||||
return $this->hasMany('App\LanguageString', 'language_id', 'id');
|
||||
|
||||
Reference in New Issue
Block a user