Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Gpanos's avatar

PHP 8 attributes

Hey all, I was studying php 8 attributes, trying to see any real world use cases and I ended up building a small package. Do you think that it's worth polishing it and publish it? Is it something that you could use in your projects? Any feedback is greatly appreciated

https://github.com/gpanos/laravel-observe-attribute

Thanks a ton.

0 likes
3 replies
jlrdw's avatar

Thanks for sharing with community, will have a look when I get a chance.

1 like
newbie360's avatar

same as in Model add ?

protected static function boot()
{
    parent::boot();
    static::observe(\App\Observers\SomethingObserver::class);
}

Please or to participate in this conversation.