
PK 
<?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class SiteSeting extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'site_setings';
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 = [
'facebook_url','facebook_authkey','google_url','google_authkey','twitter_url','twitter_authkey','company_name','company_address','company_gstno','company_state','iscard_discount','card_disamount','isactive','isdelete','addedby','created_at','updated_at','deleted_at','visitor'
];
/**
* The attributes that are mass assignable.
*
* @var array
*/
// protected $visible = [];
/**
* Scope a query to only include active users.
*
* @param \Illuminate\Database\Eloquent\SiteSeting $query
* @return \Illuminate\Database\Eloquent\SiteSeting
*/
public function scopeActive($query)
{
return $query->where('isactive', 1);
}
public function getCreatedAtAttribute($date)
{
return Carbon::createFromFormat('Y-m-d H:i:s', $date)->format('d-M-Y h:i A');
}
public function getUpdatedAtAttribute($date)
{
return Carbon::createFromFormat('Y-m-d H:i:s', $date)->format('d-M-Y h:i A');
}
}


PK 99