mochrira / selvi-framework
Super fast PHP Framework for building API
Installs: 1 045
Dependents: 3
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
- dev-master
- 2.x-dev
- 2.2.0
- 2.1.17
- 2.1.16
- 2.1.15
- 2.1.14
- 2.1.13
- 2.1.12
- 2.1.11
- 2.1.10
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 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
- dev-master-2.0
This package is auto-updated.
Last update: 2024-12-19 08:16:56 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