
PK 
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class UserDetail extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'user_details';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id','user_fname','user_lname','user_email','user_contactno','user_address','user_country','user_state','user_city','user_pincode','created_at','updated_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);
}
/**
* Get the index name for the model.
*
* @return string
*/
public function user()
{
return $this->belongsTo('App\User');
}
}


PK 99