lots of updates

This commit is contained in:
2022-10-19 14:33:03 -06:00
parent 427d4e2500
commit 625dfeb79f
26 changed files with 771 additions and 714 deletions

115
src/app/Models/Language.php Normal file
View File

@ -0,0 +1,115 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Prunable;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Language extends Model
{
use HasFactory;
use Prunable;
/** @var string */
protected $table = 'languages';
/** @var array<int,string> */
protected $fillable = [
'locale',
'iso_code',
'name',
'localized_name',
];
/**
|--------------------------------------------------------------------------
| Class Constants
|--------------------------------------------------------------------------
|
*/
//
/**
|--------------------------------------------------------------------------
| Custom/Private Methods
|--------------------------------------------------------------------------
|
*/
/**
* Get the prunable model query.
*
* @package App\Models\Language
* @since 1.0.0
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function prunable(): Builder
{
//return static::where('deleted_at', '<=', now()->subMonth());
}
/**
* Prepare the model for pruning.
*
* @package App\Models\Language
* @since 1.0.0
*
* @return void
*/
protected function pruning(): void
{
//
}
/**
|--------------------------------------------------------------------------
| Accessors
|--------------------------------------------------------------------------
|
*/
//
/**
|--------------------------------------------------------------------------
| Mutators
|--------------------------------------------------------------------------
|
*/
//
/**
|--------------------------------------------------------------------------
| Scopes
|--------------------------------------------------------------------------
|
*/
//
/**
|--------------------------------------------------------------------------
| Relationships
|--------------------------------------------------------------------------
|
*/
/**
* User relationship.
*
* @package App\Models\Language
* @since 1.0.0
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function users(): HasMany
{
return $this->hasMany(User::class);
}
}