Adds a Filament admin (Profile settings page plus CRUD resources for Education, Experience, Projects, and Posts) backing a public-facing personal site: hero/about/timeline home page, project showcase, and blog, styled with a dark editorial theme (Fraunces + Instrument Sans). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
36 lines
793 B
PHP
36 lines
793 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class Profile extends Model
|
|
{
|
|
protected $fillable = [
|
|
'name',
|
|
'headline',
|
|
'bio',
|
|
'location',
|
|
'email',
|
|
'avatar',
|
|
'resume_path',
|
|
'social_links',
|
|
];
|
|
|
|
protected $casts = [
|
|
'social_links' => 'array',
|
|
];
|
|
|
|
protected function avatarUrl(): Attribute
|
|
{
|
|
return Attribute::get(fn () => $this->avatar ? Storage::disk('public')->url($this->avatar) : null);
|
|
}
|
|
|
|
protected function resumeUrl(): Attribute
|
|
{
|
|
return Attribute::get(fn () => $this->resume_path ? Storage::disk('public')->url($this->resume_path) : null);
|
|
}
|
|
}
|