A Laravel-like PHP framework built from scratch using core PHP.
- MVC architecture
- Routing system
- Dependency injection container
- View rendering
- Database abstraction layer
- Environment configuration
- Clone the repository
- Run
composer installto install dependencies - Configure your web server to point to the
publicdirectory - Copy
.env.exampleto.envand configure your environment variables - Start building your application!
The quickest way to run your application locally is using PHP's built-in web server:
# Navigate to the public directory
cd public
# Start the built-in PHP server
php -S localhost:8000app/- Application codebootstrap/- Application bootstrap filesconfig/- Configuration filesdatabase/- Database migrations and seedspublic/- Public files and entry pointresources/- Views and assetsroutes/- Route definitionsstorage/- Application storagetests/- Test filesvendor/- Composer dependencies
// Define a route in routes/web.php
$router->get('/hello/{name}', function ($request) {
$name = $request->get('name');
return "Hello, {$name}!";
});Now you have a Laravel-like folder structure and basic framework built with core PHP. This implementation includes:
- An MVC architecture
- A routing system similar to Laravel
- A dependency injection container
- View rendering
- Configuration management
- Database abstraction
- Service providers
- Environment variable loading