packages/press/src/Models/WpOption.php
<?php
namespace Moox\Press\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class WpOption extends Model
{
use HasFactory;
protected $fillable = ['option_name', 'option_value', 'autoload'];
protected $searchableFields = ['*'];
protected $wpPrefix;
protected $table;
protected $primaryKey = 'option_id';
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->wpPrefix = config('press.wordpress_prefix');
$this->table = $this->wpPrefix.'options';
}
}