I'm following the site documentation: link , but I'm not getting it implement the option below:
Setting a subject You can specify on which object the activity is performed by using performedOn:
activity()
->performedOn($someContentModel)
->log('edited');
$lastActivity = Activity::all()->last(); //returns the last logged activity
$lastActivity->subject; //returns the model that was passed to 'performedOn';
The performedOn-function has a shorter alias name: on
When I try to pass the parameters in the controller it generates error in performedOn($someContentModel)
, I would like to know what I should use instead of the $ someContentModel variable.