45 lines
989 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
namespace App\Http\Controllers\Modules;
2019-11-16 10:21:14 +03:00
use App\Abstracts\Http\Controller;
2017-09-14 22:21:00 +03:00
use App\Traits\Modules;
2018-05-28 16:46:52 +03:00
use App\Models\Module\Module;
2017-09-14 22:21:00 +03:00
class Home extends Controller
{
use Modules;
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$data = [
'query' => [
'limit' => 4
]
];
2019-01-30 18:39:39 +03:00
$pre_sale = $this->getPreSaleModules($data);
$paid = $this->getPaidModules($data);
$new = $this->getNewModules($data);
$free = $this->getFreeModules($data);
2019-11-16 10:21:14 +03:00
$installed = Module::all()->pluck('enabled', 'alias')->toArray();
2017-09-14 22:21:00 +03:00
2020-11-06 00:43:46 +03:00
return $this->response('modules.home.index', compact('pre_sale', 'paid', 'new', 'free', 'installed'));
2017-09-14 22:21:00 +03:00
}
/**
* Show the form for viewing the specified resource.
*
* @return Response
*/
public function show()
{
return redirect()->route('apps.home.index');
}
2017-09-14 22:21:00 +03:00
}