/
ximain1
/
tpu-backend
Обзор
Документация
Войти
/
ximain1
/
tpu-backend
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
app/Models/Driver.php
35 строк
1 KB
Попехин Константин Сергеевич
Корректное создание маршрутных листов и их отображение
18 дек 2025, 08:32
18 дек 2025, 08:32
978ff2b
Код
Авторство
О чём код?
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; /** * @property int $id * @property string $name * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property-read \App\Models\RouteSheet|null $route_sheet * @method static \Database\Factories\DriverFactory factory($count = null, $state = []) * @method static \Illuminate\Database\Eloquent\Builder<static>|Driver newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder<static>|Driver newQuery() * @method static \Illuminate\Database\Eloquent\Builder<static>|Driver query() * @method static \Illuminate\Database\Eloquent\Builder<static>|Driver whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|Driver whereId($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|Driver whereName($value) * @method static \Illuminate\Database\Eloquent\Builder<static>|Driver whereUpdatedAt($value) * @mixin \Eloquent */ class Driver extends Model { /** @use HasFactory<\Database\Factories\DriverFactory> */ use HasFactory; public function route_sheet(): BelongsTo{ return $this->belongsTo(RouteSheet::class); } public $timestamps = false; protected $fillable = ['name']; }