1. Go to this page and download the library: Download memran/marwa-framework 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/ */
memran / marwa-framework example snippets
// routes/web.php
use Marwa\Application\Routing\Route;
Route::get('/', function () {
return 'Hello from Marwa!';
});
use Marwa\Application\Auth\Auth;
if ( Auth::check() ) {
$user = Auth::user();
}
use Marwa\Application\Notification\Notify;
Notify::to('[email protected]')->send('Welcome to Marwa Framework!');
namespace App\Models;
use Marwa\Application\Models\Model;
class User extends Model
{
protected $table = 'users';
}
use App\Models\User;
$users = User::all();
$user = User::find(1);