File "ArticleToProject.php"
Full Path: /var/www/html/back/app/Models/ArticleToProject.php
File size: 922 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Carbon;
/**
* Class ArticleToProject
*
* @property int $id
* @property int $article_id
* @property int $project_id
* @property float $amount_limit
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Article $article
* @property Project $project
*/
class ArticleToProject extends Model
{
protected $table = 'article_to_project';
protected $fillable = [
'article_id',
'project_id',
'amount_limit',
];
protected $casts = [
'amount_limit' => 'float',
];
public function article(): BelongsTo
{
return $this->belongsTo(Article::class);
}
public function project(): BelongsTo
{
return $this->belongsTo(Project::class);
}
}