-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to Bolt, the modern PHP framework designed to make web development fast, fun, and efficient. Bolt combines simplicity with powerful features, offering a unique development experience for both beginners and seasoned developers.
Key Features:
- Modern Architecture: Built on a sleek MVC (Model-View-Controller) structure for clean, maintainable code.
- Intuitive Routing: Simple yet flexible routing to manage application flow effortlessly.
- Powerful CLI: Command-line tools to streamline development tasks.
- Seamless Database Integration: Easy ORM for multiple databases.
- Elegant Templating: Support for Twig and Blade templates.
- Middleware Support: Efficient request handling.
- Authentication and Authorization: Secure user management.
- Efficient Caching: Speed up your application with built-in caching.
- Robust Error Handling: Tools for catching and debugging errors.
- Community and Support: Growing community and extensive documentation.
Follow these steps to get started with Bolt and build your first application:
To install Bolt, run the following command:
composer create-project bayrameker/my-bolt-framework new-project
cd new-project
Copy the example environment file and configure your settings:
cp .env.example .env
Edit the .env
file to match your environment setup.
Start the server to begin developing your application:
php bolt serve
Use the Bolt CLI to create a new controller:
php bolt make:controller HomeController
Add routes and create views to build out your application.
Example Route Definition:
// routes/web.php
$router->get('/home', [App\Controllers\HomeController::class, 'index']);
Example Controller:
// app/Controllers/HomeController.php
namespace App\Controllers;
use Core\Controller;
class HomeController extends Controller
{
public function index()
{
return view('home.index', ['message' => 'Welcome to Bolt!']);
}
}
Example View:
<!-- resources/views/home/index.twig -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ title }}</title>
</head>
<body>
<h1>{{ message }}</h1>
</body>
</html>
- Installation Guide: Detailed instructions to set up Bolt.
- Project Structure: Understanding the directory layout.
- Advanced Features: Delve deeper into Bolt’s capabilities.
- Community and Support: Get help and contribute.
Join the Bolt community today and start building the future of web development!