50 lines
798 B
PHP
50 lines
798 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class BilletCategorie
|
|
*
|
|
* @property int $id
|
|
* @property int $billet_id
|
|
* @property int $categorie_id
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
*
|
|
* @property Billet $billet
|
|
* @property Category $category
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class BilletCategorie extends Model
|
|
{
|
|
protected $table = 'billet_categorie';
|
|
|
|
protected $casts = [
|
|
'billet_id' => 'int',
|
|
'categorie_id' => 'int'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'billet_id',
|
|
'categorie_id'
|
|
];
|
|
|
|
public function billet()
|
|
{
|
|
return $this->belongsTo(Billet::class);
|
|
}
|
|
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(Category::class, 'categorie_id');
|
|
}
|
|
}
|