
PK 
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class VarianteSlider extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'variante_sliders';
use SoftDeletes;
/**
* The VarianteSliders that should be mutated to dates.
*
* @var array
*/
protected $dates = ['deleted_at'];
/**
* The VarianteSliders that are mass assignable.
*
* @var array
*/
protected $fillable = [
'id','product_id','slider_sortby','vslider_image','isvisible','isactive','isdelete','addedby','created_at','updated_at','deleted_at','visitor'
];
/**
* Scope a query to only include active users.
*
* @param \Illuminate\Database\Eloquent\VarianteSlider $query
* @return \Illuminate\Database\Eloquent\VarianteSlider
*/
public function scopeActive($query)
{
return $query->where('isactive', 1);
}
/**
* Get the index name for the model.
*
* @return string
*/
public function product()
{
return $this->belongsTo('App\Product');
}
}


PK 99