'MyComments List', 'description' => 'List of my comments' ]; } public function defineProperties() { return [ 'perPage' => [ 'title' => 'Number of offers', 'description' => 'How many offers do you want to display', 'default' => 12, 'validationPattern' => '^[0-9]+$', 'validationMessage' => 'Only numbers allowed' ], ]; } public function onRun() { $this->comments = $this->loadComments(); } protected function loadComments() { $perPage = $this->property('perPage'); return \Auth::user()->comments() ->orderBy('updated_at', 'desc') ->paginate($perPage); } }