Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
gilour
/
back
/
app
/
Models
:
ArticleToProject.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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); } }