Download the PHP package bbecker48/codeigniter4-eloquent without Composer
On this page you can find all versions of the php package bbecker48/codeigniter4-eloquent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bbecker48/codeigniter4-eloquent
More information about bbecker48/codeigniter4-eloquent
Files in bbecker48/codeigniter4-eloquent
Package codeigniter4-eloquent
Short Description Simple integration of Laravel Eloquent ORM into CodeIgniter 4 via Composer.
License MIT
Informations about the package codeigniter4-eloquent
CodeIgniter 4 Eloquent
Simple integration of the Laravel Eloquent ORM into CodeIgniter 4 via Composer.
The package automatically initializes Eloquent when a CodeIgniter application starts. No additional service or event configuration is required in your project.
Requirements
- PHP 8.2 or later
- CodeIgniter 4.5 or later
- MySQL or MariaDB
- Composer
Installation
From the root directory of your CodeIgniter 4 project, run:
Eloquent and its dependencies will be installed automatically.
Database configuration
Configure your database connection in the CodeIgniter .env file:
The package automatically uses the CodeIgniter database configuration to initialize Eloquent.
Create an Eloquent model
Create your models in app/Models.
Example:
You can then use Eloquent directly from your controllers:
All standard Eloquent features can be used, including queries, relationships, collections and CRUD operations.
How it works
The package integrates illuminate/database with the CodeIgniter lifecycle and automatically boots Eloquent when the application starts.
You do not need to modify:
app/Config/Services.phpapp/Config/Events.php- your CodeIgniter core files
Documentation
License
This package is open-sourced software licensed under the MIT License.