App store vendor's app page added.
This commit is contained in:
@ -40,6 +40,34 @@ class Tiles extends Controller
|
||||
return view('modules.tiles.index', compact('title', 'modules', 'installed'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for viewing the specified resource.
|
||||
*
|
||||
* @param $alias
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function vendorModules($alias)
|
||||
{
|
||||
$this->checkApiToken();
|
||||
|
||||
$page = request('page', 1);
|
||||
|
||||
$request = [
|
||||
'query' => [
|
||||
'page' => $page,
|
||||
]
|
||||
];
|
||||
|
||||
$data = $this->getModulesByVendor($alias, $request);
|
||||
|
||||
$title = $data->vendor->name;
|
||||
$modules = $data->modules;
|
||||
$installed = Module::all()->pluck('status', 'alias')->toArray();
|
||||
|
||||
return view('modules.tiles.index', compact('title', 'modules', 'installed'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for viewing the specified resource.
|
||||
*
|
||||
|
@ -90,6 +90,28 @@ trait Modules
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getVendors()
|
||||
{
|
||||
$response = $this->getRemote('apps/vendors');
|
||||
|
||||
if ($response && ($response->getStatusCode() == 200)) {
|
||||
return json_decode($response->getBody())->data;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getModulesByVendor($alias, $data = [])
|
||||
{
|
||||
$response = $this->getRemote('apps/vendors/' . $alias, 'GET', $data);
|
||||
|
||||
if ($response && ($response->getStatusCode() == 200)) {
|
||||
return json_decode($response->getBody())->data;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getMyModules($data = [])
|
||||
{
|
||||
$response = $this->getRemote('apps/my', 'GET', $data);
|
||||
|
Reference in New Issue
Block a user