ldc-mesbr-app/app/Models/Mouvement.php

43 lines
682 B
PHP
Raw Permalink Normal View History

2019-01-15 14:17:15 +01:00
<?php
namespace App\Models;
2019-01-15 14:17:15 +01:00
use Illuminate\Database\Eloquent\Model;
class Mouvement extends Model
{
/**
* @var string
*/
protected $table = 'mouvement';
/**
* @var string
*/
protected $primaryKey = 'mouvement_id';
/**
* @var boolean
*/
public $timestamps = false;
protected $dates = ['mouvement_created_at'];
/**
* @var array
*/
protected $fillable = [
'mouvement_nombre',
'mouvement_created_at'
];
/**
* ManyToOne
* Mouvement -> Coupon
*/
public function coupon()
{
return $this->belongsTo('App\Models\Coupon', 'mouvement_couponId');
2019-01-15 14:17:15 +01:00
}
}