Download app/Http/Controllers/Api/ExtensionController.php from pnacorp/magicai: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/pnacorp/magicai/resolve/main/app/Http/Controllers/Api/ExtensionController.php
- Command line
-
hf download hf://pnacorp/magicai/app/Http/Controllers/Api/ExtensionController.php
-
curl -L -o ExtensionController.php https://huggingface.co/pnacorp/magicai/resolve/main/app/Http/Controllers/Api/ExtensionController.php
1.19 kB
| namespace App\Http\Controllers\Api; | |
| use App\Http\Controllers\Controller; | |
| use App\Models\Extension; | |
| use App\Models\Setting; | |
| use App\Models\SettingTwo; | |
| class ExtensionController extends Controller | |
| { | |
| protected $settings; | |
| protected $settings_two; | |
| public function __construct() | |
| { | |
| $this->settings = Setting::first(); | |
| $this->settings_two = SettingTwo::first(); | |
| } | |
| // /** | |
| // * Gets installed extensions | |
| // * | |
| // * @OA\Get( | |
| // * path="/api/extensions", | |
| // * operationId="extensionIndex", | |
| // * tags={"Extensions"}, | |
| // * security={{ "passport": {} }}, | |
| // * summary="Gets installed extensions", | |
| // * description="Returns installed extensions", | |
| // * @OA\Response( | |
| // * response=200, | |
| // * description="Successful operation", | |
| // * ), | |
| // * @OA\Response( | |
| // * response=401, | |
| // * description="Unauthenticated", | |
| // * ), | |
| // */ | |
| public function extensionIndex() | |
| { | |
| $extensions = Extension::where('installed', 1)->get(); | |
| return response()->json($extensions); | |
| } | |
| } | |