Implement SocialAccount model with enum fields for network and type, along with migration and factory. Includes NETWORKS and TYPES constants for dropdown usage in Livewire forms and validation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
27 lines
509 B
PHP
27 lines
509 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SocialAccount extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public const NETWORKS = [
|
|
'twitter', 'instagram', 'facebook', 'reddit',
|
|
'tiktok', 'linkedin', 'youtube', 'other',
|
|
];
|
|
|
|
public const TYPES = ['post', 'comment', 'like'];
|
|
|
|
protected $fillable = [
|
|
'network',
|
|
'username',
|
|
'email',
|
|
'password',
|
|
'type',
|
|
];
|
|
}
|