Laravel: Observer Setup Enhancement
It’s been awhile since my last blog post. Today, just want to share something simple, an enhancement of LARAVEL: CREATE HASHED ID FOR A RESOURCE USING OBSERVER. Going to refactor a bit.
First, let’s modify the
app/Observers/Kernel.php, to be like the following:
Next, add new config file for our observer –
And that’s it!
Very simple and straightforward setup of Laravel Observer, much cleaner than before.
Should I make this as a package? Do let me know if you guys need this as a package. 🙂