Blade Components with default values in properties

Super easy way to get default property values from a Laravel Blade Component. Took me a couple of minutes to figure this out: rvery prop is available as a variable...

Anonymous Blade Components in Laravel Packages

During package development you may want to register a anonymous Blade component, instead of going the long way by creating a class you can do this:

How to string to boolean in PHP

Sometimes digesting JSON you may need to cast a string to boolean. Without trying yourself there is a function for this in PHP. This is the way to do it:...

Wildcard subdomains on Cloudflare with PHP and API-tokens

I have been using Cloudflare’s excellent DNS-service for managing my domains. Free SSL-certificates and anti-DDoS services are added benefits. However, proxied wildcard subdomains are not available except on the enterprise...

Laravel Echo and broadcasting from a package

While implementing Laravel Echo for a package I found an small problem. By default Laravel Echo looks in App\Events for events, and therefor I could not listen to the...