Download app/Models/Integration/Integration.php from pnacorp/magicai: direct link, hf CLI and curl.
- Browser
- Download file 747 Bytes
-
https://huggingface.co/pnacorp/magicai/resolve/main/app/Models/Integration/Integration.php
- Command line
-
hf download hf://pnacorp/magicai/app/Models/Integration/Integration.php
-
curl -L -o Integration.php https://huggingface.co/pnacorp/magicai/resolve/main/app/Models/Integration/Integration.php
747 Bytes
| namespace App\Models\Integration; | |
| use App\Models\Extension; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Database\Eloquent\Relations\HasOne; | |
| class Integration extends Model | |
| { | |
| protected $table = 'integrations'; | |
| protected $fillable = [ | |
| 'app', | |
| 'description', | |
| 'image', | |
| 'slug', | |
| 'status', | |
| ]; | |
| public function hasExtension(): HasOne | |
| { | |
| return $this->hasOne(Extension::class, 'slug', 'slug')->where('installed', 1); | |
| } | |
| public function extension(): HasOne | |
| { | |
| return $this->hasOne(Extension::class, 'slug', 'slug'); | |
| } | |
| public function getFormClassName(): string | |
| { | |
| return 'App\Services\Integration\\' . ucfirst($this->app); | |
| } | |
| } | |