adrema/app/Country.php

25 lines
501 B
PHP
Raw Normal View History

2020-04-12 00:26:44 +02:00
<?php
namespace App;
2021-11-17 22:32:52 +01:00
use App\Nami\HasNamiField;
2024-09-22 17:32:29 +02:00
use Database\Factories\CountryFactory;
2021-06-13 11:26:38 +02:00
use Illuminate\Database\Eloquent\Factories\HasFactory;
2021-11-17 22:32:52 +01:00
use Illuminate\Database\Eloquent\Model;
2020-04-12 00:26:44 +02:00
class Country extends Model
{
2024-09-22 17:32:29 +02:00
/** @use HasFactory<CountryFactory> */
2021-06-13 11:26:38 +02:00
use HasFactory;
2021-11-17 22:32:52 +01:00
use HasNamiField;
2021-06-13 11:26:38 +02:00
2020-04-12 00:26:44 +02:00
public $fillable = ['name', 'nami_id'];
2022-03-11 20:19:17 +01:00
public static function default(): int
{
2021-06-22 23:00:27 +02:00
return self::whereName('Deutschland')->firstOrFail()->id;
}
2020-04-12 00:26:44 +02:00
public $timestamps = false;
}