
PK 
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Promocode extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'promocodes';
use SoftDeletes;
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['deleted_at'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'vender_id','category_id','promo_name','promo_code','promo_ntime','promo_used','promo_type','promo_amount','promofrom_date','promoto_date','promomin_price','promomax_price','isactive','isdelete','addedby','created_at','updated_at','deleted_at','visitor'
];
/**
* Scope a query to only include active users.
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeActive($query)
{
return $query->where('isactive', 1);
}
}


PK 99