/
denispirit
/
otbor
Обзор
Документация
Войти
/
denispirit
/
otbor
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
app/Models/Ad.php
41 строка
714 B
denispirit
Final наверное
14 фев 2025, 14:13
14 фев 2025, 14:13
5b40404
Код
Авторство
О чём код?
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Ad extends Model { use HasFactory; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'title', 'description', 'user_id', 'category_id', 'is_active', 'image_path' ]; /** * Get the user that owns the ad. */ public function user() { return $this->belongsTo(User::class); } /** * Get the category that owns the ad. */ public function category() { return $this->belongsTo(Category::class); } }