Files
Test-Eloquent-Relationships/app/Models/Attachment.php
T
2021-11-22 10:30:12 +02:00

19 lines
354 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Attachment extends Model
{
use HasFactory;
protected $fillable = ['filename', 'attachable_id', 'attachable_type'];
public function attachable()
{
// TASK: fill in the code to make it work
}
}