Return a collection

parent 0049b79b
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Modules\Page\Http\Controllers\Api; namespace Modules\Page\Http\Controllers\Api;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller; use Illuminate\Routing\Controller;
use Modules\Page\Services\FinderService; use Modules\Page\Services\FinderService;
use Modules\Workshop\Manager\ThemeManager; use Modules\Workshop\Manager\ThemeManager;
...@@ -24,7 +25,7 @@ class PageTemplatesController extends Controller ...@@ -24,7 +25,7 @@ class PageTemplatesController extends Controller
$this->finder = $finder; $this->finder = $finder;
} }
public function __invoke() public function __invoke(Request $request)
{ {
return response()->json($this->getTemplates()); return response()->json($this->getTemplates());
} }
...@@ -48,7 +49,7 @@ class PageTemplatesController extends Controller ...@@ -48,7 +49,7 @@ class PageTemplatesController extends Controller
} }
} }
return $templates; return collect($templates);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment