block instance data in view method

Permalink
Hello,

I am working on a new block for a certain function I need on a C5 page.

In the view() method I want to extract data from the database (calendar events) based on the settings of the particular instance of the block. However, in the view() method I don't have acces to the block instance parameters.

In the view.php file I do have acces to the instance parameters, but when I try to put a new function in the controller (getEvents) which I then call from view.php, the DB object doesn't work. (calling make() on a non-object for the line $db=$this->app->make('database')->connection()

How can I extract data from the database by using the block instance parameters?

 
JohntheFish replied on at Permalink Reply
JohntheFish
In view(), use
$this->parameter_name;