I am working on a project with SlimPHP and Eloquent. I am trying to run a RAW SQL query in a model method, for example:
/models/Form.php
<?php namespace models; class Form extends \Illuminate\Database\Eloquent\Model { protected $table = 'forms'; public function getResponses($form_id) {
I use Capsule to load ORM.
The above code gives me:
Fatal error: calling select () member function for non-object in /vagrant/vendor/illuminate/support/Illuminate/Support/Facades/Facade.php on line 208
The documentation helps a lot in this case, could you shed some light on this?
thanks
source share