Starting at 18th level, when you use your action to cast a spell, you can make one weapon attack as a bonus action.
Improved War Magic
Raw data
{
"name": "Improved War Magic",
"page": 74,
"level": 18,
"__prop": "subclassFeature",
"header": 2,
"source": "PHB",
"entries": [
"Starting at 18th level, when you use your action to cast a spell, you can make one weapon attack as a bonus action."
],
"className": "Fighter",
"classSource": "PHB",
"subclassSource": "PHB",
"subclassShortName": "Eldritch Knight"
}