PHP code example of steodec / project

1. Go to this page and download the library: Download steodec/project library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

steodec / project example snippets


namespace Steodec\Controllers;

use Steodec\Project\controllers\AbstractControllers;
use Steodec\Router

class Home extends AbstractControllers {
   
    #[Routes(method:'GET', path: "/", name: 'HOME_PAGE', isGranted: 'SHOW_HOMEPAGE')]
    public function index() {
        echo "Hello World";
    }
}

namespace Steodec\Entities;

use Steodec\Project\entities\AbstractEntity;

class Users extends AbstractEntity {
    
    const TABLE_NAME = "users";

    public string $username;
    public string $email;
    public string $password;
    
    public function __construct()
    {
        parent::__construct($this);
    }
}