/** * undocumented function * * @return void * @author **/ public function store() { $validator = $this->storeValid(); if ($validator->passes()) { $input = $this->storeInput(); $event_category = EventCategory::add($input); if ($event_category) { return Redirect::route('admin.event-category')->withStatuses(['add' => 'Tambah Berhasil!']); } return Redirect::route('admin.event-category.create')->withErrors(['add' => 'Tambah Gagal!'])->withInput(); } return Redirect::route('admin.event-category.create')->withErrors($validator)->withInput(); }