Your IP : 216.73.216.79


Current Path : /var/www/html/dynaweb-starter/plugin/dynaweb-theme/src/Models/
Upload File :
Current File : /var/www/html/dynaweb-starter/plugin/dynaweb-theme/src/Models/ThemeSettings.php

<?php

namespace Dynaweb\DynawebTheme\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Dynaweb\DynawebTheme\Enums\PropertyType;
use Illuminate\Database\Eloquent\Builder;

class ThemeSettings extends Model
{
    use HasFactory;

    protected $casts = [
        'logo' => 'array',
    ];

    public function scopeTitle(Builder $query)
    {
        return $query->where('property', PropertyType::TITLE);
    }

    public function scopePrimaryColor(Builder $query)
    {
        return $query->where('property', PropertyType::PRIMARY_COLOR);
    }

    public function scopeSuccessColor(Builder $query)
    {
        return $query->where('property', PropertyType::SUCCESS_COLOR);
    }

    public function scopeDangerColor(Builder $query)
    {
        return $query->where('property', PropertyType::DANGER_COLOR);
    }

    public function scopeWarningColor(Builder $query)
    {
        return $query->where('property', PropertyType::WARNING_COLOR);
    }

    public function scopeInfoColor(Builder $query)
    {
        return $query->where('property', PropertyType::INFO_COLOR);
    }

    public function scopeGrayColor(Builder $query)
    {
        return $query->where('property', PropertyType::GRAY_COLOR);
    }

    public function scopeLogo(Builder $query)
    {
        return $query->where('property', PropertyType::LOGO);
    }

    public function scopeFavicon(Builder $query)
    {
        return $query->where('property', PropertyType::FAVICON);
    }

    public function scopeBrandOptions(Builder $query)
    {
        return $query->where('property', PropertyType::BRAND_OPTIONS);
    }

    public function scopeJS(Builder $query)
    {
        return $query->where('property', PropertyType::JS);
    }

    public function scopeCSS(Builder $query)
    {
        return $query->where('property', PropertyType::JS);
    }
}