PHP code example of wasframework / wasf-core
1. Go to this page and download the library: Download wasframework/wasf-core 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/ */
wasframework / wasf-core example snippets
$router->get('/', 'HomeController@index');
$router->get('/user/{id}', 'UserController@show');
$router->post('/login', 'AuthController@login');
return response()->json(['success' => true]);
return view('dashboard', ['title' => 'Welcome']);
DB::connect([
'driver' => 'mysql',
'host' => '127.0.0.1',
'port' => 3306,
'database' => 'wasf',
'username' => 'root',
'password' => '',
]);
$pdo = DB::pdo();
base_path();
app_path();
config();
env();
view();
response();
env('WASF_KEY');
bash
php wasf list
php wasf make:controller HomeController
php wasf make:module Blog
php wasf migrate
php wasf key:generate
Modules/Blog/
├─ Controllers/
├─ Models/
├─ Views/
└─ routes.php
txt
src/
├─ Console/
│ ├─ Commands/
│ └─ Kernel.php
├─ Database/
│ └─ DB.php
├─ Exceptions/
├─ Http/
│ ├─ Controllers/
│ ├─ Request.php
│ ├─ Response.php
│ └─ Router.php
├─ Support/
│ ├─ helpers.php
│ ├─ Env.php
│ └─ View.php
└─ Wasf.php
bootstrap/app.php