PWM does provide the most linear method of dimming and is the reason why LED drivers utilize PWM for their dimming rather than direct current regulation. There are linear ranges of mW/mA for LEDs and lasers, but factors such as threshold current, mW/mA curves, etc. may result in non-linearities in the visual light output for some input values. For example, the threshold current for a laser diode defines the minimum light output the laser can produce (besides being off), and this may actually be pretty bright depending on the laser diode (like >100mW for a 445nm laser). A PWM signal, however, could have a duty cycle of 1% or less and that would be far less bright than the minimum threshold current output.
The key for PWM-based dimming is to ensure that whatever you're rapidly turning full-on/off with PWM has its maximum current set properly so that it doesn't fry your LED (laser) if you have your PWM at full duty cycle (100% on).
The circuit I linked you regulates the maximum current using feedback in the form of the BJT transistor connected to the MOSFET gate. It works by restricting the maximum amount of current to 0.58V / Rsense (the resistor on the bottom).
What makes that circuit more "safe" (as far as current-regulation is concerned) than the one you've built is that the maximum current is fixed, and won't change (much) regardless of the input voltage (the 12V on your diagram). The low-side current regulator is pegged to a ground reference--rather than the high-side voltage reference like the current-regulating resistor in the circuit diagram you provided. If you were to raise the voltage of your power supply, it would increase the current being supplied to your LEDs in your current design.
Do note that in the circuit I linked you, the MOSFET acts as a voltage-controlled resistor. It doesn't matter what its Rds_on is because it is always acting as a resistive component. The voltage drop across the MOSFET, multiplied by the current passing through it will be how much power it has to dissipate--which can be a decent amount. It is for this reason I usually only use the circuit I linked you in lab lasers that I want to have analog/PWM control over. If you want something more portable and energy efficient, you should look into a buck/boost type circuit.