'required|between:1,255', 'account_id' => 'required|exists:accounts,id', 'targetdate' => 'date', 'amount' => 'required|min:0', 'target' => 'required|min:1', 'order' => 'required:min:1', ]; public static function factory() { $start = new Carbon; $start->endOfMonth(); return [ 'name' => 'string', 'account_id' => 'factory|Account', 'targetdate' => $start, 'amount' => 0, 'target' => 100, 'order' => 1 ]; } public function account() { return $this->belongsTo('Account'); } public function getDates() { return array('created_at', 'updated_at', 'targetdate'); } }