A ship's General Area Defense Integration Anti-Spacecraft Network (GARDIAN) consists of anti-missile / anti-fighter laser turrets on the exterior hull. Because these are under heavy computer control, the gunnery control officer needs to do little beyond turn the system on and designate targets as hostile.
Since lasers move at light speed, they cannot be dodged by anything moving at non-relativistic speeds. Unless the beam is aimed poorly, it will always hit its target. In the early stages of a battle, the GARDIAN fire is 100% accurate. It is not 100% lethal, but it doesn't have to be. Damaged fighters must break off for repairs.
Lasers are limited by diffraction. The beam spreads out, decreasing the energy density (watts per m2) the weapon can place on a target. Any high-powered laser is a short-ranged weapon.