Support the ongoing development of Laravel.io →
posted 9 years ago
Eloquent
Last updated 1 year ago.
0

The easiest way to do this is with composer. Using the latest version of Eloquent with PHP 5.2 shouldn't cause many issues, if any.

In case you didn't know how to retrieve the standalone module, you can do so easily with Composer:

{
    "require": {
        "illuminate/database": "*"
    }
}

Then run:

composer install

create a database.php file in your source files like so:

<?php  
require 'vendor/autoload.php';  
 
use Illuminate\Database\Capsule\Manager as Capsule;  
 
$capsule = new Capsule; 
 
$capsule->addConnection(array(
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => 'test',
    'username'  => 'test',
    'password'  => 'password!',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => ''
));
 
$capsule->bootEloquent();

After that, just include the database.php file in any file with your classes and use Eloquent as you usually would!

Last updated 1 year ago.
0

The easiest way to do this is with composer. Using the latest version of Eloquent with PHP 5.2 shouldn't cause many issues, if any.

illuminate/database 4+ is PHP 5.3 and above. So the answer would be no.

Last updated 1 year ago.
0

As @crynobone said - this isn't possible. Marking as solved.

Last updated 1 year ago.
0

welp, ok, apologies for my guess being incorrect. I realize I should test and research my theories like a normal person

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.