mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
32 lines
565 B
PHP
32 lines
565 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use App\LanguageString;
|
|
use Illuminate\Support\Str;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Language extends Model
|
|
{
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected $keyType = 'string';
|
|
|
|
public $incrementing = false ;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected static function booted()
|
|
{
|
|
static::creating(function($language) {
|
|
$language->id = Str::uuid();
|
|
});
|
|
}
|
|
|
|
public function languageStrings()
|
|
{
|
|
return $this->hasMany('App\LanguageString', 'language_id', 'id');
|
|
}
|
|
}
|