to squeeze
This commit is contained in:
49
laravel/app/Models/BilletCategorie.php
Normal file
49
laravel/app/Models/BilletCategorie.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user