mochrira / selvi-framework
Super fast PHP Framework for building API
Requires
- php: >=8.1
- symfony/console: ^7.0
Requires (Dev)
- lcobucci/clock: ^3.5
- lcobucci/jwt: ^5.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 3.x-dev
- 3.7.x-dev
- 3.6.x-dev
- 3.6.20
- 3.6.19
- 3.6.18
- 3.6.17
- 3.6.16
- 3.6.15
- 3.6.14
- 3.6.13
- 3.6.12
- 3.6.11
- 3.6.10
- 3.6.9
- 3.6.8
- 3.6.7
- 3.6.6
- 3.6.5
- 3.6.4
- 3.6.3
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.x-dev
- 3.5.3
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.x-dev
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 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: 2026-11-12 02:57:50 UTC
README
⚡ Framework PHP super cepat untuk membangun API
Mulai dengan Selvi
Tutorial ini membuat aplikasi sederhana dengan satu route / yang ditangani
oleh function closure. Tidak perlu membuat kelas controller atau konfigurasi
database untuk mencobanya.
Persiapan
- Apache dengan
mod_rewriteaktif dan konfigurasiAllowOverride Alluntuk direktori aplikasi, supaya aturan.htaccessdapat digunakan. - PHP 8.1 atau lebih baru.
- Composer untuk menginstal Selvi Framework dan dependensinya.
1. Siapkan proyek
Buat direktori proyek di document root Apache, misalnya htdocs/selvi-app,
lalu jalankan perintah berikut dari direktori tersebut:
composer require mochrira/selvi-framework
2. Buat route dan jalankan framework
Buat file index.php di direktori proyek:
<?php require __DIR__ . '/vendor/autoload.php'; \Selvi\Routing\Route::get('/', function () { return response('Halo, Selvi Framework!'); }); \Selvi\Framework::run();
Route GET / di atas menggunakan closure sebagai controller. Helper
response() mengirimkan teks sebagai respons HTTP.
3. Arahkan request ke index.php
Buat file .htaccess di direktori proyek:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]
Pastikan Apache mengizinkan penggunaan .htaccess pada direktori tersebut.
Buka http://localhost/selvi-app/ di browser; halaman akan menampilkan
Halo, Selvi Framework!.