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 -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -