doefom, to Laravel
@doefom@mastodon.social avatar

Another cool feature of the #Laravel 'Number' helper is the abbreviation function. Especially useful for dashboards and stuff.

#php #webdev

doefom, to Laravel
@doefom@mastodon.social avatar

"Blueprint" generates code for your app. Create draft.yaml, define what to generate, package handles the boilerplate stuff for you. This example generates a controller, factory, migration, model and test. Very neat to begin a project with.

doefom, to Laravel
@doefom@mastodon.social avatar

Currently updating one of our biggest sites from v3 to v5. 1000+ entries and multisite. At first I thought it would be a pain but seeing how everything looks "new" now and feels lighter is absolutely worth the effort

Skoop, to php
@Skoop@phpc.social avatar

I wrote something about making the choice between upgrading or upgrading: https://skoop.dev/blog/2024/06/07/upgrade_or_upgrade/

doefom, to Laravel
@doefom@mastodon.social avatar

ships with a collection helper 'chunkWhile' that lets you chunk a collection while a given condition is met. Once the condition is no longer met, a new chunk is started and so on. Example: Grouping dates by day.

stux, to Laravel
@stux@mstdn.social avatar
davidbisset, to Laravel
@davidbisset@phpc.social avatar
valorin, to Laravel
@valorin@phpc.social avatar

It's quite common to inject JSON into Blade templates for various use cases, but is it actually safe to do so?
It depends... how are you doing it, and are you using json_encode() properly?
https://securinglaravel.com/security-tip-safely-rendering-json/

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. #Laravel can help with that using the 'Number::spell' helper.

#php #webdev

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 😁

doefom, to Laravel
@doefom@mastodon.social avatar

The last few days I've shown some examples of how I use macros in #Laravel for certain classes in my daily work. In case you enjoy using macros as much as I do, here's a list of some popular and frequently used classes that implement the Macroable trait that you might not yet have on your radar.

simonhamp, to Laravel
@simonhamp@phpc.social avatar

Here's a little #Laravel #PHP 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 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.

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

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! #php #laravel https://masteringlaravel.io/daily/2024-05-31-how-do-you-test-code-you-dont-understand

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.

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? #Laravel

Skye, to Laravel
@Skye@chaos.social avatar

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

DM me if you’re interested :3 #getfedihired

jclermont, to php
@jclermont@phpc.social avatar
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.

tjventurini, to Laravel
@tjventurini@mastodon.social avatar

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

🌐 Web Development
🎨 Web Design
🧑‍💻 #Coding
🧰 #Laravel
👀 #Vue
💼 #Freelancing

#letsconnect

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. #php #laravel https://masteringlaravel.io/daily/2024-05-27-dont-use-the-config-helper-in-a-config-file

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.

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