'bool', 'user_mountable' => 'bool', ]; /** * Rules verifying that the data being stored matches the expectations of the database. * * @var string */ public static $validationRules = [ 'id' => 'required|string|size:36|unique:mounts,id', 'name' => 'required|string|min:2|max:64|unique:mounts,name', 'description' => 'nullable|string|max:255', 'source' => 'required|string', 'target' => 'required|string', 'read_only' => 'sometimes|boolean', 'user_mountable' => 'sometimes|boolean', ]; /** * Returns all eggs that have this mount assigned. * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function eggs() { return $this->belongsToMany(Egg::class); } /** * Returns all nodes that have this mount assigned. * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function nodes() { return $this->belongsToMany(Node::class); } }