MOON
Server: Apache
System: Linux server.royaltuning.hu 4.18.0-425.13.1.el8_7.x86_64 #1 SMP Tue Feb 21 04:20:52 EST 2023 x86_64
User: royaltuning (1001)
PHP: 8.2.32
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/royaltuning/public_html/public/backoffice.royaltuning.hu/app/Models/Shop.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Shop extends Model
{
    protected $fillable = [
        'name',
        'url',
        'consumer_key',
        'consumer_secret',
        'is_master',
        'is_active',
        'last_product_import_at',
        'last_product_match_at',
    ];

    protected $casts = [
        'is_master' => 'boolean',
        'is_active' => 'boolean',
        'last_product_import_at' => 'datetime',
        'last_product_match_at' => 'datetime',
    ];

    public function products()
    {
        return $this->hasMany(ShopProduct::class);
    }

    public function scopeActive($query)
    {
        return $query->where('is_active', true);
    }

    public function scopeMaster($query)
    {
        return $query->where('is_master', true);
    }
}