Файловый менеджер - Редактировать - /home/clickysoft/public_html/charliapp-v2.clickysoft.net/app/Models/Attachment.php
Назад
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Spatie\MediaLibrary\MediaCollections\Models\Media; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; class Attachment extends Model implements HasMedia { use HasFactory; use InteractsWithMedia; protected $fillable = [ 'chapter_card_id', 'file_path', 'user_id' ]; public function chapterCard() { return $this->hasMany(ChaptersCard::class,'chapter_card_id','id'); } public function getFilePathAttribute() { return $this->attributes["file_path"]; } public function getFilePathUrlAttribute() { return asset('storage/attachments/' . $this->attributes["user_id"] . '/' . $this->attributes["file_path"]); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка