Fixed the issue. Was actually overriding the constructor. Added
parent::construct();
in Capsule constructor.
I found this tutorial easy to understand for using Eloquent in PHP without Laravel. https://www.cloudways.com/blog/eloquent-illuminate-in-php-without-laravel/ This tutorial describes everything from capsule config to testing the code.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.