mochrira / selvi-framework
Super fast PHP Framework for building API
1.3.0
2024-03-07 18:01 UTC
- dev-master
- 2.x-dev
- 1.3.x-dev
- 1.3.0
- 1.2.x-dev
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.0
- 0.4.15
- 0.4.14
- 0.4.13
- 0.4.12
- 0.4.11
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.55
- 0.3.54
- 0.3.53
- 0.3.52
- 0.3.51
- 0.3.50
- 0.3.49
- 0.3.48
- 0.3.47
- 0.3.46
- 0.3.45
- 0.3.44
- 0.3.43
- 0.3.42
- 0.3.41
- 0.3.40
- 0.3.39
- 0.3.38
- 0.3.37
- 0.3.36
- 0.3.35
This package is auto-updated.
Last update: 2024-05-01 08:22:08 UTC
README
⚡ Super fast PHP Framework for building API
Quick Start
- Get this framework via composer on your project directory (inside www folder if you are using Apache)
$ composer require mochrira/selvi-framework
- Create
app/Controllers
folder inside your project directory - Create file
HomeController.php
insideapp/Controllers
with this content
<?php
namespace App\Controllers;
use Selvi\Controller;
class HomeController extends Controller {
function __construct() {
parent::__construct();
}
function index() {
return response('Welcome to Selvi Framework');
}
}
- Create index.php
<?php
require('vendor/autoload.php');
use Selvi\Route;
Route::get('/', 'HomeController@index');
Selvi\Framework::run();
- Create
.htaccess
file
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
- Edit your composer.json
{
...
"autoload": {
"psr-4": {
"App\\": "app/"
}
}
...
}
- Run
composer update
to update your composer autoload - Done. Open
http://localhost/your-project
on your browser to test it