'required|string|between:1,60|unique:locations,short', 'long' => 'string|nullable|between:1,191', ]; /** * Gets the nodes in a specified location. * * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function nodes() { return $this->hasMany(Node::class); } /** * Gets the servers within a given location. * * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough */ public function servers() { return $this->hasManyThrough(Server::class, Node::class); } }