Nah the other waySo... smites.
I'm not talking about Ranger/Paladin right now.The way to do it is a combination of a feature to add the effect of a cantrip to an attack with a weapon, and spells that are only work taking to use with weapon attacks.
Half caster spells aren’t weak, they’re only weak in the hands of someone not focused on weapon use. People compare them to wizard spells as if the wizard is also stabbing someone as a martial character in the same turn, rather than only casting the spell. The smites and similar Ranger spells make the paladin and Ranger deal damage and apply strong conditions to a degree that makes them competitive with any other class. (Ranger in 24 isn’t weak, just frustrating, and Paladin is still one of the best classes)
The other thing to do for a gish is to give monk-like discipline moves they can do as a BA or alongside casting or attacking, and/or warlock invocation style features that let you do basic magic stuff at-will that others need spell slots to do. The game doesn’t even fit from “what if Wish, but with a sword”, but it would benefit from a class that at high level can deal any damage type with each attack while making a spell into a rider effect on an attack, with some spells that do stuff that other classes don’t really do involving both magical effects and physical attack/movement/etc within the same action.
I'm talking about the Gish.
The way I would do it is heavy spell that lets you attack five times. You cast it it gives you temporary haste which allows you to attack five times.
You cast another spell that lets you attack from 100 ft away.
You cast another spell that lets you teleport to the Target anytime someone makes an opportunity attack against it.
You cast aspell that leaves a clone of yourself next to the Target which continuously attacks them as you go to other things.
You cast a spell that temporarily makes you invisible when you're attacking for that turn only so your target cannot see where you're stabbing them.
In exchange you do not get extra attack.
Basically instead of getting extra attack indomitable and movement bonuses from your base class you have spells that you cast on yourself or your enemy which gives you a offense defense and movement buff. Your base attack is better than a spellcaster and your spell list allows you to use your better basic attack.