
PK 
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
//use Illuminate\Database\Eloquent\SoftDeletes;
class Wishlist extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'wishlists';
//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 = [
'id','wish_uid','wish_pid','wish_status','created_at','updated_at','deleted_at','visitor'
];
/**
* Scope a query to only include active users.
*
* @param \Illuminate\Database\Eloquent\Wishlist $query
* @return \Illuminate\Database\Eloquent\Wishlist
*/
public function scopeActive($query)
{
return $query->where('wish_status', 1);
}
/**
* Get the index name for the model.
*
* @return string
*/
public function product()
{
return $this->belongsTo('App\Product');
}
}


PK 99