diff --git a/app/controller/Controller.php b/app/Controller/HomeController.php similarity index 67% rename from app/controller/Controller.php rename to app/Controller/HomeController.php index 2147aab..2d77ac6 100644 --- a/app/controller/Controller.php +++ b/app/Controller/HomeController.php @@ -3,7 +3,7 @@ namespace Nischcodes\Shiftcalc\App\Controller; /** - * Controller + * HomeController * * main controller for this application * @@ -19,6 +19,15 @@ namespace Nischcodes\Shiftcalc\App\Controller; * @link https://projects.nisch.codes/nischcodes/shiftcalc */ -class Controller extends Nischcodes\ShiftCalc\Controller { +use Nischcodes\Shiftcalc\Attributes\Route; +use Nischcodes\Shiftcalc\MVC\BaseController; + +class HomeController extends BaseController { + + #[Route('GET', '/')] + public function index() { + echo "Homepage"; + } + //TODO } \ No newline at end of file diff --git a/app/Model/HomeModel.php b/app/Model/HomeModel.php new file mode 100644 index 0000000..395d722 --- /dev/null +++ b/app/Model/HomeModel.php @@ -0,0 +1,37 @@ + + * @copyright 2021 nisch.codes + * @license https://projects.nisch.codes/nischcodes/shiftcalc/src/branch/main/LICENSE GPL-3 + * @version 1.0.0 + * @link https://projects.nisch.codes/nischcodes/shiftcalc + */ + +use Nischcodes\Shiftcalc\MVC\BaseModel; + +class HomeModel implements BaseModel { + + // implement the init function + public function init() { + echo "HomeModel init"; + } + + // implement the getAll function + public function getAll() { + return []; + } + + public function get($index){} +} \ No newline at end of file diff --git a/app/resources/layout/index.html b/app/Resources/Layout/index.html similarity index 97% rename from app/resources/layout/index.html rename to app/Resources/Layout/index.html index 070b779..320f6f7 100644 --- a/app/resources/layout/index.html +++ b/app/Resources/Layout/index.html @@ -19,6 +19,6 @@
- +