Welcome Guest, Not a member yet? Register   Sign In
Illuminate Database Wrapper

(This post was last modified: 07-25-2021, 04:37 PM by nfaiz.)


This is my fun project for last weekend. But I've got time constraint to release due to eid celebration.

Illuminate Database Wrapper for CodeIgniter 4.

It uses CodeIgniter 4 debug toolbar to show the query collector for Illuminate Database.

You can use Illuminate Database features like
  • Query Builder
  • Schema Builder
  • Eloquent ORM

I am not Laravel developer, it just my colleague did ask me whether can use eloquent with CodeIgniter. So why not?

I cant explore much right now. Just reading a quick documentation here how to setup the library.

  1. Installation via composer
    composer require nfaiz/dbtoolkit:dev-main

  2. Setup via spark
    php spark dbtoolkit:publish

  3. Open app/Config/DbToolkit.php for library configuration.

  4. Basic usage (query builder)

    Use capsule() for db instance. Make sure DBgroup connection has been made.

    E.g for basic usage.

    In controller
    PHP Code:
    $user capsule()::table('users')->where('id'1)->get();
    $results capsule()::select('select * from users where id = ? or id = ?', [12]); 

    Debug toolbar
    [Image: 2MIxNp2.png]

Thank you.

Messages In This Thread
Illuminate Database Wrapper - by nfaiz - 07-21-2021, 11:51 PM
RE: Illuminate Database Wrapper - by kenjis - 12-11-2021, 01:06 AM
RE: Illuminate Database Wrapper - by InsiteFX - 12-11-2021, 02:36 AM
RE: Illuminate Database Wrapper - by abmcr - 12-27-2021, 02:11 AM

Theme © iAndrew 2016 - Forum software by © MyBB