Spaces:
Running
Running
Download app/Models/Scientist.php from Ailixir-AI-Team/ailixir-api: direct link, hf CLI and curl.
- Browser
- Download file 547 Bytes
-
https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/06e8928c07068b151bcea9d64ac2b8b28c9090ff/app/Models/Scientist.php
- Command line
-
hf download hf://spaces/Ailixir-AI-Team/ailixir-api@06e8928c07068b151bcea9d64ac2b8b28c9090ff/app/Models/Scientist.php
-
curl -L -o Scientist.php https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/06e8928c07068b151bcea9d64ac2b8b28c9090ff/app/Models/Scientist.php
547 Bytes
| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Scientist extends Model | |
| { | |
| protected $fillable = [ | |
| 'name', | |
| 'nationality', | |
| 'birth_year', | |
| 'death_year', | |
| 'images', | |
| 'bio', | |
| 'impact', | |
| 'field' | |
| ]; | |
| protected $casts = [ | |
| 'images' => 'array', | |
| ]; | |
| public function awards() | |
| { | |
| return $this->belongsToMany(Award::class, 'award_scientist') | |
| ->withPivot('year_won', 'contribution') | |
| ->withTimestamps(); | |
| } | |
| } | |