doefom, to Laravel
@doefom@mastodon.social avatar

I think in English when you write formal text you spell the numbers until 10. From there on you just write the number. can help with that using the 'Number::spell' helper.

doefom, to Laravel
@doefom@mastodon.social avatar

TIL that 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 😁

jclermont, to php
@jclermont@phpc.social avatar

How do you test code you don't understand? We deal with this when joining legacy projects, but I recently found a novel solution involving fuzz testing. Super useful! https://masteringlaravel.io/daily/2024-05-31-how-do-you-test-code-you-dont-understand

simonhamp, to Laravel
@simonhamp@phpc.social avatar

Here's a little tool I built as my New Tab page

It lists all my projects based on the filesystem, giving me an overview of their state at a glance and quick access to various tools

It also lets me add custom details, search and more

It's built on Laravel Volt, which was really fun to use!

Will open source at some point

video/mp4

michael, to Laravel
@michael@thms.uk avatar

Been playing around with Laravel Livewire a bit today, and it’s quite cool actually.

Really a powerful way to quickly get an app with interactivity going, if you can’t or don’t want to use a JS framework.

doefom, to Laravel
@doefom@mastodon.social avatar

By default #Laravel will wrap your json resources in a 'data' key. The '::withoutWrapping()' method lets you disable this behavior.

You can turn this off for all resources extending the JsonResource class or just for specific ones, that's up to you.

#webdev

tjventurini, to Laravel
@tjventurini@mastodon.social avatar

Hi 👋 I'm looking to with people who are interest in

🌐 Web
🎨 Web Design
🧑‍💻
🧰
👀
🔵
🐧
🚀 Self Improvement
🌱 Growing on X

Sjors1985, to Laravel
@Sjors1985@phpc.social avatar

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?

davidbisset, to php
@davidbisset@phpc.social avatar

FrankinPHP is a "Modern App Server, written in ".

Native support for HTTP/1.1, HTTP/2 and HTTP/3, automatic HTTPS, OPcache and XDebug natively supported.

Native support for and more.

Interesting (and a cute logo).

https://frankenphp.dev/

doefom, to webdev
@doefom@mastodon.social avatar

Just published a new release of one of my 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.

jclermont, to php
@jclermont@phpc.social avatar
Skye, to Laravel
@Skye@chaos.social avatar

Any 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).

DM me if you’re interested :3

Crell, to Java
@Crell@phpc.social avatar

Oh. My. Fucking. God.

I have just learned that " 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 "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 even more.

jclermont, to php
@jclermont@phpc.social avatar

It's best practice to always use the config helper in our application code, except for one place: Don't use the config helper in config files.

Here's an explanation as to why. https://masteringlaravel.io/daily/2024-05-27-dont-use-the-config-helper-in-a-config-file

tjventurini, to Laravel
@tjventurini@mastodon.social avatar

Hi 👋 I'm looking to with people who are interest in

🌐 Web Development
🎨 Web Design
🧑‍💻
🧰
👀
💼

doefom, to Laravel
@doefom@mastodon.social avatar

Macros are one thing I enjoy using the most in . It's a way to extend the functionality of many built-in 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.

Here's what this might look like.

emd, to Laravel
@emd@cosocial.ca avatar

What am I missing folks, you can't have multiple listeners (in an array) in v11?

https://laracasts.com/discuss/channels/laravel/laravel-11-register-event-with-multiple-listeners

michael, to Laravel
@michael@thms.uk avatar

So, it really annoyed me that in Laravel 11 you cannot have multiple listeners for the same event in an array like you could in Laravel 10.

It's not like it's a big deal, as it's simple enough to implement, but just seems like a step backwards.

What do you think?

https://blog.thms.uk/2024/05/event-listeners-laravel-11?utm_source=mastodon

#Laravel #PHP

doefom, to Software German
@doefom@mastodon.social avatar

What’s the best piece of you use in your daily work as a developer?

doefom, to Laravel
@doefom@mastodon.social avatar

Using global query scopes for simple one-to-many tenancy.

Code example of a cat pension 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.

doefom, to Laravel
@doefom@mastodon.social avatar

When developing 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 😁

Is there a better approach?

tvbeek,
@tvbeek@phpc.social avatar

@doefom that is why I wrote mail catchall.

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.

https://packagist.org/packages/tjvb/laravel-mail-catchall

marmelab, to php
@marmelab@mastodon.social avatar

🎉 Exciting news! Marmelab is sponsoring the API Platform Conference 2024, the flagship event dedicated to the API Platform framework!

Join us for 2 days of talks by leading experts in , & .

📅 19 & 20 September
📍 Lille, France

Learn more: https://api-platform.com/fr/con/2024/

@cooptilleuls

jclermont, to php
@jclermont@phpc.social avatar

Ever run into a timeout from a Composer script in CI? Test coverage reports are a super common example for me.

Here's how to prevent that, along with a gotcha if you're calling scripts within scripts. https://masteringlaravel.io/daily/2024-05-21-disabling-composer-timeout-with-nested-scripts

jclermont, to php
@jclermont@phpc.social avatar

How do you discover interesting new packages for your Laravel apps? #php #laravel https://masteringlaravel.io/daily/2024-05-20-how-do-you-discover-interesting-new-packages

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines