This spell can be used with any spell-caster class. If in your world the magic is plentiful and everybody, in some sense or another, is attuned to magic, non-caster classes can cast it as a cantrip, though only weapons they have proficiency with and only in battle. The weapon is dispelled at the end of duration of the spell, by dismissing it or the weapon is destroyed or you are disarmed. You can summon two dagger for dual wielding, but if you you don't have something like ranger's fighting style:two-weapon fighting, then you will not gain the skill modifier to the damage of the second attack, anything bigger than a dagger you can summon only one of, but you can expend multiple spell slots within one action to summon two weapons of your choosing, for example: if you have two level 1 spell slots available, then you can choose to expend both two summon two swords.
You can use the magical energy to bring forth from the astral plane a weapon of your choosing, the weapon consist of magical energy made hard. The weapon you've summoned is actually a soul of a once great warrior and by being in contact you gain the knowledge the warrior once possessed or by using the magic streaming through you from the sword, you supplement the lack of year of training to masterfully wield the weapon, by the magical energy, either way you gain proficiency for the weapon you've summoned for the duration of the spell or until it's dismissed.
When you acquire this spell you can choose two paths:
1.You can use your spellcasting ability's modifier for attack and damage rolls instead of dexterity or strength.
2.If you are mage:
2.1.You keep the skill modifier of the weapon, but you can expend spell slots of higher level to get a bonus of +1 for each level you expend (Level 1 not counting) to both.
2.2.Instead of gaining a bonus for each higher level spell slot expended, you can choose to infuse your weapon with elemental energy of your choosing to get a bonus of 1d6 to damage rolls. You can add one type of elemental energy for each higher level spell slot you expend.
For example: If you expend 9-th level spell slot to summon a sword, you can get +8 to attack and damage rolls (by way of 2.1.) or infuse your weapon with earth, fire, water, wind, but not limited to, to gain a total of 4d6 to damage rolls and +4 to attack and damage rolls (to the weapons itself, this does not apply to bonus damage from elements), or you can go full on elemental and have your weapon gain 8d6 to damage rolls.