PHPackages                             bayrameker/my-bolt-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. bayrameker/my-bolt-framework

ActiveProject[Framework](/categories/framework)

bayrameker/my-bolt-framework
============================

A modern PHP framework with Bolt CLI

v0.0.4(1y ago)23284MITPHPPHP ^7.4 || ^8.0

Since Jul 13Pushed 1y ago6 watchersCompare

[ Source](https://github.com/bayrameker/bolt)[ Packagist](https://packagist.org/packages/bayrameker/my-bolt-framework)[ RSS](/packages/bayrameker-my-bolt-framework/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

Bolt PHP Framework
==================

[](#bolt-php-framework)

Bolt is a fast and lightweight PHP framework. Its simple and flexible structure makes it ideal for small to medium-sized projects.

Features
--------

[](#features)

- MVC (Model-View-Controller) architecture
- Simple routing system
- Easy and fast dependency injection
- View rendering support

Installation
------------

[](#installation)

1. Create a new project using Composer:

```
composer create-project bayrameker/my-bolt-framework new-project
cd new-project
```

2. Install the necessary dependencies:

```
composer install
```

3. Create the `.env` file and configure the necessary settings:

```
cp .env.example .env
```

4. Start the server:

```
php bolt serve
```

Usage
-----

[](#usage)

### Bolt Commands

[](#bolt-commands)

The available commands for the Bolt framework are:

- `php bolt migrate` - Runs the database migrations.
- `php bolt create:migration {name}` - Creates a new database migration.
- `php bolt seed` - Runs the database seeders.
- `php bolt controller {name} [-v]` - Creates a new controller. Use the `-v` option to also add a view and route.
- `php bolt model {name}` - Creates a new model.
- `php bolt service {name}` - Creates a new service.
- `php bolt repository {name}` - Creates a new repository.
- `php bolt dump-autoload` - Updates Composer autoload files.
- `php bolt serve` - Starts the application.

### Router

[](#router)

You can add new routes in the `routes/web.php` file:

```
$router->get('/home', [App\Controllers\HomeController::class, 'index']);
```

### Controller

[](#controller)

To create a new controller, create a new PHP file in the `app/Controllers` directory:

```
