php - Using Eloquent ORM without Laravel -


is possible use eloquent without laravel? or knows equaly easy use orm?

thanks!

yes can. while ago dan horrigan released package called capsule laravel 4 allowed eloquent used independently , minimal setup. package has been merged l4 core no longer need use package.

if refer illuminate/database repository there nice little introduction on using eloquent without framework.

here small excerpt of getting , running.

$capsule = new illuminate\database\capsule($config);  $capsule->booteloquent();  $capsule->connection()->table('users')->where('id', 1)->first(); 

update

dan horrigan has since removed capsule implementation built directly eloquent. refer above illuminate/database link more details on how use capsule.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -