Файловый менеджер - Редактировать - /home/clickysoft/public_html/charliapp-v2.clickysoft.net/app/Models/Outline.php
Назад
<?php namespace App\Models; use \DateTimeInterface; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Outline extends Model { use HasFactory; public const STATUS_RADIO = [ '0' => 'Disable', '1' => 'Enable', ]; public $table = 'outlines'; protected $dates = [ 'created_at', 'updated_at', 'deleted_at', ]; protected $fillable = [ 'user_id', 'series_id', 'book_id', 'outline_name', 'outline_title', 'description', 'color_id', 'status', 'image_id', 'created_at', 'updated_at', 'deleted_at', ]; public function user() { return $this->belongsTo(User::class, 'user_id'); } public function series() { return $this->belongsTo(Series::class, 'series_id'); } public function book() { return $this->belongsTo(Book::class, 'book_id'); } public function color() { return $this->belongsTo(Color::class, 'color_id'); } public function image() { return $this->belongsTo(UserGallery::class, 'image_id'); } public function chapters() { return $this->hasMany(Chapter::class); } public function collaborators() { return $this->morphToMany(User::class, 'collaboratable', 'collaborations') ->withPivot('role') ->withTimestamps(); } public function comments() { return $this->morphMany(Comment::class, 'commentable'); } protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } public function collaborator() { return $this->hasMany(Collaboration::class,'user_id','user_id'); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка