the RunwareAI Plugin is working now

This commit is contained in:
2025-07-30 23:24:47 +02:00
parent 07c6786bda
commit 47860b4b7d
35 changed files with 544 additions and 218 deletions

View File

@@ -10,7 +10,8 @@ class StyleController extends Controller
{
public function index()
{
$styles = Style::where('enabled', true)
$styles = Style::with(['aiModel.apiProviders'])
->where('enabled', true)
->whereHas('aiModel', function ($query) {
$query->where('enabled', true);
$query->whereHas('apiProviders', function ($query) {
@@ -19,6 +20,10 @@ class StyleController extends Controller
})
->get();
if ($styles->isEmpty()) {
return response()->json(['message' => __('api.no_styles_available')], 404);
}
return response()->json($styles);
}
}