I'm having a problem with some users, and to discover the problem I want to record things, in views and controller.
I use:
Controller.php
public function records($user_id, $event_id, $action){
$record = new Record();
$record->user_id = $user_id;
$record->event_id = $event_id;
$record->action = $action;
$record->save();
}
What I use in my controllers
$this->records(0, 0,'user in this step');
What I'm trying in views.blade.php
{{\App\Http\Controllers\Controller::records(0, 0,'ajax success')}}
This returns the error: Non static method
{{\App\Http\Controllers\Controller->records(0, 0,'ajax success')}}
This returns the error: "->" unexpected operator
So How can I call the function? Probably it's easy but I'm new with Laravel.
Thanks