I think in English when you write formal text you spell the numbers until 10. From there on you just write the number. #Laravel can help with that using the 'Number::spell' helper.
TIL that #Statamic ships with the 'isCpRoute()' function, which allowed me to make my code a little more compact. The function will check if the current route is a control panel route or not. Here's the old and new code. Feels refreshing 😁
I've running into an issue and couldn't figure out what's going wrong. I'm trying to load some traits in my Laravel 10-factories, but every time I receive a message the trait is already declared and in use. Is anyone familiar with this issue and could help me to solve it? #Laravel
Just published a new release of one of my #Statamic addons. But first I rewrote the whole thing, then updated the README, noticed that half of my code is not necessary, rewrote the whole thing, then updated the README again. That's how I work.
Any #laravel devs in DE looking for a job or freelance gig at the moment?
Must be fluent-ish in German and able to work in a codebase that heavily relies on Vue (though if you have experience with Svelte, react, or another modern reactive JS framework other than Vue that would be fine).
I have just learned that "#Java Bean" has two completely different and incompatible definitions.
One is a dumb, badly designed data object with getters and setters.
The other is... a service object managed by the Spring framework IoC container.
Holy hell. This is 10x worse than #Laravel "facades."
Am I wrong here? This is what I'm finding from online tutorials. Is there more nuance that is not coming through, because for now I just hate #Spring even more.
Macros are one thing I enjoy using the most in #Laravel. It's a way to extend the functionality of many built-in #Facades by providing custom callbacks for a specific key.
One production example I use macros for fairly often is what I call the "admin alert". Especially in smaller applications I want to get notified whenever an error or an event occurs the admin (mostly that's me) should know about.
Using global query scopes for simple one-to-many tenancy.
Code example of a #Laravel cat pension #SaaS app I've started and never finished. It's structured like this:
A user belongs to a pension
A pension has many clients
A client has many animals
Users (cat pension owners and their employees) can only view clients and animals from the same pension. Global query scopes ensure this rule is consistently applied throughout the app without accidentally forgetting it somewhere in your code.
When developing #Laravel applications I'm always a little afraid of sending emails to actual customers or placing real orders by accident. So I came up with a habit that works super well for me and maybe this will suit you as well.
In my /config/mail.php I add a 'developer' email address and ensure in my AppServiceProvider all emails are sent to this address when in non-production environments no matter what. Makes me build and test stuff way more confidently 😁
It will replace the receiver and will optional add all the original receivers (to, cc, bcc) to the content of the email. That makes it useful for an acceptance environment to verify who would normally receive the email.