public function index()
 {
     $validator = JsValidator::make($this->validationRules);
     $categories = CalendarCategories::whereRaw('memberId = ?', array(Auth::id()))->get();
     $results['categories'] = $categories;
     $results['categories_entries'] = "";
     $results['categoryId'] = 0;
     return view('calendar.index')->with('results', $results);
 }
示例#2
0
 public function ajax_validation($ajax_validation = null)
 {
     if (is_null($ajax_validation)) {
         if ($this->ajax_validation) {
             AssetManager::addScript(asset('vendor/jsvalidation/js/jsvalidation.js'));
             return \JsValidator::make($this->build_validation_rules(), [], $this->build_validation_messages());
         } else {
             return false;
         }
     }
     $this->ajax_validation = $ajax_validation;
     return $this;
 }