ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/home2/selectio/www/bharath/a1tex.in/app/Model/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/home2/selectio/www/bharath/a1tex.in/app/Model/Shop.php

<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Shop extends Model
{
    protected $casts = [
        'seller_id ' => 'integer',
        'created_at'  => 'datetime',
        'updated_at'  => 'datetime',
    ];

    public function seller()
    {
        return $this->belongsTo(Seller::class, 'seller_id');
    }

    public function scopeActive($query){
        return $query->whereHas('seller', function ($query) {
            $query->where(['status' => 'approved']);
        });
    }
}

Zerion Mini Shell 1.0