Skip to content

Codeigniter 3.1.0 Integrated with Illuminate Database Eloquent

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
license.txt
Notifications You must be signed in to change notification settings

aduartem/codeigniter-eloquent

Repository files navigation

Codeigniter 3.1.0 Integrated with Illuminate Database Eloquent

Requires

php: >=5.5.9

Installation

Install the Illuminate Database package with Composer:

$ composer install

Using The Eloquent ORM

Example:

Model

<?php
use \Illuminate\Database\Eloquent\Model as Eloquent;

class User extends Eloquent{
    protected $table = 'users';

}

Controller

defined('BASEPATH') OR exit('No direct script access allowed');

class Home extends CI_Controller {

	public function index()
	{
		$this->load->model('user');

		$users = User::where('votes', '>', 1)->get();

		$this->load->view('home/index', ['users' => $users]);
	}
}

Documentation

About

Codeigniter 3.1.0 Integrated with Illuminate Database Eloquent

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
license.txt

Stars

Watchers

Forks

Packages

No packages published

Languages