32 lines
662 B
PHP
32 lines
662 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Modules\Home;
|
||
|
|
|
||
|
|
use App\Core\Controller as BaseController;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Home Controller
|
||
|
|
* Handles homepage
|
||
|
|
*/
|
||
|
|
class Controller extends BaseController
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Show homepage
|
||
|
|
*/
|
||
|
|
public function index()
|
||
|
|
{
|
||
|
|
if ($this->request()->expectsJson()) {
|
||
|
|
return $this->json([
|
||
|
|
'message' => 'Woles Framework 1.0 running 🚀',
|
||
|
|
'version' => '1.0.0',
|
||
|
|
'status' => 'active'
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
|
||
|
|
return $this->view('Home.view.index', [
|
||
|
|
'title' => 'Woles Framework v1.0',
|
||
|
|
'message' => 'Woles Framework 1.0 running 🚀'
|
||
|
|
]);
|
||
|
|
}
|
||
|
|
}
|