'MyOffers List', 'description' => 'List of my offers' ]; } 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 onDeleteOffer() { $product = Product::find(Input::get('id')); $product->images()->delete(); $product->translations()->delete(); $product->delete(); return \Redirect::back(); } public function onRun() { $this->offers = $this->loadOffers(); $this->today = \Carbon\Carbon::now(); $this->wantToDelete = trans('validation.post_delete_confirm'); } protected function loadOffers() { $perPage = $this->property('perPage'); return \Auth::user()->products() ->orderBy('updated_at', 'desc') ->paginate($perPage); } }