1. Go to this page and download the library: Download xeno-php/xeno 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/ */
xeno-php / xeno example snippets
Route::get('login', 'LoginController', 'index', [Guest::class]);
// dynamic urls
Route::get('post/{id}','PostController','index');
Route::get('post/{id}/comment/{comment_id}','PostController','comment');
// PostController.php
namespace App\Controllers;
class PostController{
public function index($id){
echo $id;
}
public function comment($id, $comment_id){
echo "Post id : $id and comment Id : $comment_id";
}
}
bash
composer create-project xeno-php/xeno-php My-App
cd My-App
composer serve
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.