38 lines
845 B
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
<?php
namespace App\Http\Controllers\Modules;
use App\Http\Controllers\Controller;
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
use Illuminate\Routing\Route;
class Home extends Controller
{
use Modules;
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
2017-11-02 02:00:54 +03:00
$this->checkApiToken();
$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);
2018-05-28 16:46:52 +03:00
$installed = Module::all()->pluck('status', 'alias')->toArray();
2017-09-14 22:21:00 +03:00
2019-01-30 18:39:39 +03:00
return view('modules.home.index', compact('pre_sale', 'paid', 'new', 'free', 'installed'));
2017-09-14 22:21:00 +03:00
}
}