unioil-loyalty-app/app/CodeCardType.php

43 lines
777 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class CodeCardType extends Model
{
/**
* Table name of model
*
* @var string
*/
protected $table = 'code_card_type';
/**
* Primary key field name of table
*
* @var string
*/
protected $primaryKey = 'cardtype_id';
/**
* Additional fields from other connected tables
*
* @var array
*/
protected $appends = [];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = ['created_at','updated_at','created_by','updated_by','is_active'];
public function idNumberType()
{
return $this->hasMany('App\IDNumberType','cardtype_id','cardtype_id');
}
}