Download app/Models/Introduction.php from pnacorp/magicai: direct link, hf CLI and curl.
- Browser
- Download file 611 Bytes
-
https://huggingface.co/pnacorp/magicai/resolve/main/app/Models/Introduction.php
- Command line
-
hf download hf://pnacorp/magicai/app/Models/Introduction.php
-
curl -L -o Introduction.php https://huggingface.co/pnacorp/magicai/resolve/main/app/Models/Introduction.php
611 Bytes
| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Introduction extends Model | |
| { | |
| use HasFactory; | |
| protected $fillable = ['key', 'intro', 'order']; | |
| protected $casts = [ | |
| 'key' => \App\Enums\Introduction::class, | |
| ]; | |
| public static function getFormattedSteps() | |
| { | |
| return self::orderBy('order')->get()->map(function ($item) { | |
| return [ | |
| 'intro' => $item->intro, | |
| 'element' => '[data-name="' . $item->key->value . '"]', | |
| ]; | |
| }); | |
| } | |
| } | |