Conditionally Prevent Record Edit?

I know I can disable form inputs one-by-one via ->disabled(...). But, what if I wish to prevent editing for entire page based on a field in the model. Like if $record->is_locked == true ?

If would be great to prevent the edit page from opening or in the least open to a view page.

Thanks in advance for any guidance!
Was this page helpful?