File size: 1,194 Bytes
5f32fbd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <?php
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);
}
}
|