Download app/Services/GatewaySelector.php from pnacorp/magicai: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/pnacorp/magicai/resolve/main/app/Services/GatewaySelector.php
- Command line
-
hf download hf://pnacorp/magicai/app/Services/GatewaySelector.php
-
curl -L -o GatewaySelector.php https://huggingface.co/pnacorp/magicai/resolve/main/app/Services/GatewaySelector.php
339 Bytes
| namespace App\Services; | |
| use Exception; | |
| class GatewaySelector | |
| { | |
| public static function selectGateway($gateway, $error = 'Something went wrong..') | |
| { | |
| $service = config("services.{$gateway}.class"); | |
| if ($service) { | |
| return resolve($service); | |
| } | |
| throw new Exception($error); | |
| } | |
| } | |