GenyPHP is a lightweight, easy-to-use PHP framework designed for building web applications quickly and efficiently.
- Clone or download the Repository
git clone https://github.com/bellash13/GenyPHP.git
Alternatively, you can download the directory and start coding your valuable application
-
Navigate to the Project Directory
cd GenyPHP
-
Install Dependencies Make sure you have Composer installed, then run:
composer install
-
Setting Up Routes Define your routes in
App/Routes/routes.php
. Example:use GenyPhp\Routers\Router; $router = new Router(); $router->add('GET', '/home', 'App\Controllers\HomeController', 'index'); $router->dispatch();
-
Creating Controllers Place your controllers in
App/Controllers
. ExampleHomeController.php
:namespace App\Controllers; use GenyPhp\Controllers\Controller; class HomeController extends Controller { public function index() { $data = ['title' => 'Welcome to GenyPHP!']; $this->render('Home/index', $data); } }
-
Creating Views with custom Layouts Store your views in
App/Views
. ExampleHome/index.php
:<h1>Welcome to GenyPHP!</h1> <p><?=$title?></p>
For layouts, use
App/Views/Shared/layout.php
and include views dynamically:$this->renderLayout('Home/index', $data, 'Shared/layout');
-
Public Directory Access your application through the
public
directory in theApp
folder.
- Add support for layout view.
- Add database support using Doctrine.
- Add support for REST returning JSON.
- Add authentication support.
- Add authorization support.
- Add attributes usage support.
- Update the readme file.
Contributions are welcome! Please feel free to submit a pull request or create an issue for any bugs or feature requests.
This project is licensed under the MIT License.