Spaces:
Running
Running
Download app/Models/Award.php from Ailixir-AI-Team/ailixir-api: direct link, hf CLI and curl.
- Browser
- Download file 566 Bytes
-
https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/main/app/Models/Award.php
- Command line
-
hf download hf://spaces/Ailixir-AI-Team/ailixir-api/app/Models/Award.php
-
curl -L -o Award.php https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/main/app/Models/Award.php
566 Bytes
| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Award extends Model | |
| { | |
| protected $fillable = [ | |
| 'name', | |
| 'category', | |
| 'images', | |
| 'description', | |
| 'notable_winners', | |
| 'country', | |
| 'year_started', | |
| 'website' | |
| ]; | |
| protected $casts = [ | |
| 'images' => 'array', | |
| ]; | |
| public function scientists() | |
| { | |
| return $this->belongsToMany(Scientist::class, 'award_scientist') | |
| ->withPivot('year_won', 'contribution') | |
| ->withTimestamps(); | |
| } | |
| } | |