unioil-loyalty-app/app/ProductDetails.php

44 lines
712 B
PHP
Executable File

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ProductDetails extends Model
{
/**
* Table name of model
*
* @var string
*/
protected $table = 'product_details';
/**
* Primary key field name of table
*
* @var string
*/
protected $primaryKey = 'pd_id';
/**
* Additional fields from other connected tables
*
* @var array
*/
protected $appends = [];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = ['pd_id'];
public function productCategory()
{
return $this->hasOne('App\ProductCategory','pc_id','pc_id');
}
}