unioil-loyalty-app/app/PhotoSlider.php

50 lines
845 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class PhotoSlider extends Model
{
/**
* Table name of model
*
* @var string
*/
protected $table = 'photo_slider';
/**
* Primary key field name of table
*
* @var string
*/
protected $primaryKey = 'photoslider_id';
/**
* Additional fields from other connected tables
*
* @var array
*/
protected $appends = [];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [];
/**
* The attributes that should be mutated to dates.
*
* @var array
*/
protected $dates = ['is_active'];
public function promotion()
{
return $this->hasOne('App\Promotions','promotion_id','promotion_id');
}
}