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/2d89783abe7121b3ffff2cc48cba5806b9e02ce0/app/Models/Scientist.php
- Command line
-
hf download hf://spaces/Ailixir-AI-Team/ailixir-api@2d89783abe7121b3ffff2cc48cba5806b9e02ce0/app/Models/Scientist.php
-
curl -L -o Scientist.php https://huggingface.co/spaces/Ailixir-AI-Team/ailixir-api/resolve/2d89783abe7121b3ffff2cc48cba5806b9e02ce0/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(); | |
| } | |
| } | |