2018-10-23 18:47:55 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Wizard;
|
|
|
|
|
2021-05-20 15:18:43 +03:00
|
|
|
use App\Abstracts\Http\Controller;
|
2018-10-24 18:30:37 +03:00
|
|
|
use App\Traits\Modules;
|
2018-10-23 18:47:55 +03:00
|
|
|
|
|
|
|
class Finish extends Controller
|
|
|
|
{
|
2018-10-24 18:30:37 +03:00
|
|
|
use Modules;
|
|
|
|
|
2020-01-08 11:33:39 +03:00
|
|
|
/**
|
|
|
|
* Instantiate a new controller instance.
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
// Add CRUD permission check
|
2020-06-21 18:00:31 +03:00
|
|
|
$this->middleware('permission:read-admin-panel')->only('index', 'show', 'edit', 'export');
|
2020-01-08 11:33:39 +03:00
|
|
|
}
|
|
|
|
|
2018-10-23 18:47:55 +03:00
|
|
|
/**
|
|
|
|
* Show the form for creating a new resource.
|
|
|
|
*
|
|
|
|
* @return Response
|
|
|
|
*/
|
2018-10-24 12:07:28 +03:00
|
|
|
public function index()
|
2018-10-23 18:47:55 +03:00
|
|
|
{
|
2019-11-16 10:21:14 +03:00
|
|
|
setting()->set('wizard.completed', 1);
|
2018-10-23 18:47:55 +03:00
|
|
|
|
2018-10-24 12:24:20 +03:00
|
|
|
// Save all settings
|
|
|
|
setting()->save();
|
2018-10-23 18:47:55 +03:00
|
|
|
|
2018-10-24 18:30:37 +03:00
|
|
|
$data = [
|
|
|
|
'query' => [
|
2022-06-01 10:15:55 +03:00
|
|
|
'limit' => 6
|
2018-10-24 18:30:37 +03:00
|
|
|
]
|
|
|
|
];
|
|
|
|
|
|
|
|
$modules = $this->getFeaturedModules($data);
|
|
|
|
|
2021-05-20 15:18:43 +03:00
|
|
|
return $this->response('wizard.finish.index', compact('modules'));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Show the form for creating a new resource.
|
|
|
|
*
|
|
|
|
* @return Response
|
|
|
|
*/
|
|
|
|
public function update()
|
|
|
|
{
|
|
|
|
setting()->set('wizard.completed', 1);
|
|
|
|
|
|
|
|
// Save all settings
|
|
|
|
setting()->save();
|
|
|
|
|
|
|
|
return response()->json([]);
|
2018-10-23 18:47:55 +03:00
|
|
|
}
|
|
|
|
}
|