Implements Task 2: creates the Site model with fillable name, url, and description fields; the corresponding database migration; and a factory for generating test data. Includes TDD tests verifying model creation with and without optional description. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
18 lines
265 B
PHP
18 lines
265 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Site extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'url',
|
|
'description',
|
|
];
|
|
}
|