Easily create product webpages in your website Video preview
https://reddit.com/link/1jnvpvt/video/ybt1qgffjyre1/player
Sharing a video preview of creating a product from admin panel and displaying in the website. Using Laravel and Livewire.
Project:
https://github.com/oitcode/samarium
https://redd.it/1jnvpvt
@r_php
https://reddit.com/link/1jnvpvt/video/ybt1qgffjyre1/player
Sharing a video preview of creating a product from admin panel and displaying in the website. Using Laravel and Livewire.
Project:
https://github.com/oitcode/samarium
https://redd.it/1jnvpvt
@r_php
Weekly help thread
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1jnwilu
@r_php
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1jnwilu
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Anyone else regret using Livewire?
I'm building a project for a friend's startup idea, and I chose to use Livewire. I thought it was a great idea to have both the frontend and backend in the same language, meaning that my friend's other friend who is also working on the project wouldn't have to learn 2 new frameworks.
However, I'm starting to regret my decision. These are the reasons why.
Poor Documentation and Lack of Community
Despite the fact that it is developed by Laravel, there doesn't seem to be much of a community around Livewire. The documentation is also pretty poor, particularly when it comes to Volt. I installed Breeze with Livewire, and the Livewire installer created Volt class-based components. I thought this was a pretty great idea - it seemed like React but in PHP. However, there is even less documentation for Volt than the rest of Livewire - it's relegated to a single page down the bottom of the documentation menu. And even then, the majority of the documentation is regarding functional components, not class-based components. (I personally think they should do the same thing that Vue 3 did with Options/Composition API - have a switch at the top of the documentation index that lets you choose which you want to see).
Unhelpful error messages
Often, when you encounter an error, you will get the following message:
To get the real error message, you're then required to look in the logs.
Lack of UI Libraries
Livewire does ship with a UI library (Flux), but it's a paid product. There are only a few other UI libraries specifically for Livewire, such as Mary UI.
On the whole, I think Livewire is a great idea but hasn't really taken off or been managed that well. I'm seriously considering ripping it out (at least for the core business logic of the site) and replacing it with Inertia and Vue (which I am much more familiar with).
https://redd.it/1jnx27n
@r_php
I'm building a project for a friend's startup idea, and I chose to use Livewire. I thought it was a great idea to have both the frontend and backend in the same language, meaning that my friend's other friend who is also working on the project wouldn't have to learn 2 new frameworks.
However, I'm starting to regret my decision. These are the reasons why.
Poor Documentation and Lack of Community
Despite the fact that it is developed by Laravel, there doesn't seem to be much of a community around Livewire. The documentation is also pretty poor, particularly when it comes to Volt. I installed Breeze with Livewire, and the Livewire installer created Volt class-based components. I thought this was a pretty great idea - it seemed like React but in PHP. However, there is even less documentation for Volt than the rest of Livewire - it's relegated to a single page down the bottom of the documentation menu. And even then, the majority of the documentation is regarding functional components, not class-based components. (I personally think they should do the same thing that Vue 3 did with Options/Composition API - have a switch at the top of the documentation index that lets you choose which you want to see).
Unhelpful error messages
Often, when you encounter an error, you will get the following message:
htmlspecialchars(): Argument 1 ($string) must be of type string, stdClass given
To get the real error message, you're then required to look in the logs.
Lack of UI Libraries
Livewire does ship with a UI library (Flux), but it's a paid product. There are only a few other UI libraries specifically for Livewire, such as Mary UI.
On the whole, I think Livewire is a great idea but hasn't really taken off or been managed that well. I'm seriously considering ripping it out (at least for the core business logic of the site) and replacing it with Inertia and Vue (which I am much more familiar with).
https://redd.it/1jnx27n
@r_php
fluxui.dev
Flux · Livewire UI kit
The official Livewire component library. Built by the folks behind Livewire and Alpine.
Weekly Ask Anything Thread
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1jntxdp
@r_php
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1jntxdp
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Should I Master Pure PHP Before Becoming a Laravel Expert?
To become a master of Laravel, do I need to be really proficient in pure PHP first? I already have programming skills, understand OOP, and know PHP syntax along with common functions. I also built my graduation project using Laravel. However, I don't have a deep understanding of Laravel yet. I have never built a complete system with pure PHP, nor have I manually implemented models like MVC from scratch.
I want to gain deep understanding to optimize performance and enhance security as well. So, should I develop a complete system using pure PHP first?
https://redd.it/1jnu1yn
@r_php
To become a master of Laravel, do I need to be really proficient in pure PHP first? I already have programming skills, understand OOP, and know PHP syntax along with common functions. I also built my graduation project using Laravel. However, I don't have a deep understanding of Laravel yet. I have never built a complete system with pure PHP, nor have I manually implemented models like MVC from scratch.
I want to gain deep understanding to optimize performance and enhance security as well. So, should I develop a complete system using pure PHP first?
https://redd.it/1jnu1yn
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Counter strike like game with 100% PHP code test coverage
https://github.com/solcloud/Counter-Strike
https://redd.it/1jnzaxu
@r_php
https://github.com/solcloud/Counter-Strike
https://redd.it/1jnzaxu
@r_php
GitHub
GitHub - solcloud/Counter-Strike: Multiplayer FPS game - Counter-Strike: Football 🏉
Multiplayer FPS game - Counter-Strike: Football 🏉. Contribute to solcloud/Counter-Strike development by creating an account on GitHub.
Fixing error handling in Inertia.js
https://mnapoli.fr/fixing-inertia-error-handling
https://redd.it/1jnzpd2
@r_php
https://mnapoli.fr/fixing-inertia-error-handling
https://redd.it/1jnzpd2
@r_php
Hi!
Fixing error handling in Inertia.js
Bref Cloud is built with Laravel and Inertia.js. Inertia.js connects Laravel with Vue.js, making everything related to routing, auth, state management, and more, much easier to handle. Inertia.js is awesome. However, there is one thing that I really dislike…
Websockets and real-time events in NativePHP for mobile
https://www.youtube.com/watch?v=6jS_0FKW_Bo&ab_channel=SimonHamp
https://redd.it/1jo1g6s
@r_php
https://www.youtube.com/watch?v=6jS_0FKW_Bo&ab_channel=SimonHamp
https://redd.it/1jo1g6s
@r_php
YouTube
Websockets and real-time events in NativePHP for mobile
This is one of those critical pieces web applications that I think it's imperative we have on mobile apps built this way.
With NativePHP for mobile, it's a breeze! 🍃
Real-time support will be launching in the coming days.
💌 Join the newsletter
https:/…
With NativePHP for mobile, it's a breeze! 🍃
Real-time support will be launching in the coming days.
💌 Join the newsletter
https:/…
I broke down improvements of switching to ParaTest
https://tilbrooktech.com/articles/2025/03/faster-tests-with-paratest
https://redd.it/1jo1gml
@r_php
https://tilbrooktech.com/articles/2025/03/faster-tests-with-paratest
https://redd.it/1jo1gml
@r_php
Jarryd Tilbrook
Using ParaTest for running tests faster - Jarryd Tilbrook
How to switch to ParaTest so your test suite can take advantage of parallelism and execute faster.
How do you handle client requested data changes?
Lets say you deployed an app for a client.
Now the client comes back to you and requests some data to be changed, like wording in a table column. Or maybe changing the parent\\child of some data...
1. Create migration to change the data
2. Edit manually in SQL tooling
3. Create a custom endpoint that applies it in code
4. ...?
What's best practice here?
(To be clear, not database structure changes)
https://redd.it/1jo2wek
@r_php
Lets say you deployed an app for a client.
Now the client comes back to you and requests some data to be changed, like wording in a table column. Or maybe changing the parent\\child of some data...
1. Create migration to change the data
2. Edit manually in SQL tooling
3. Create a custom endpoint that applies it in code
4. ...?
What's best practice here?
(To be clear, not database structure changes)
https://redd.it/1jo2wek
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Fixing error handling with Inertia.js and Laravel
https://mnapoli.fr/fixing-inertia-error-handling
https://redd.it/1jo5i2q
@r_php
https://mnapoli.fr/fixing-inertia-error-handling
https://redd.it/1jo5i2q
@r_php
Hi!
Fixing error handling in Inertia.js
Bref Cloud is built with Laravel and Inertia.js. Inertia.js connects Laravel with Vue.js, making everything related to routing, auth, state management, and more, much easier to handle. Inertia.js is awesome. However, there is one thing that I really dislike…
20 Laravel Features I Never Knew About (Until I Read ALL the Docs!)
https://youtu.be/kefX13MaJiQ
https://redd.it/1job1dy
@r_php
https://youtu.be/kefX13MaJiQ
https://redd.it/1job1dy
@r_php
YouTube
20 Laravel Features I Never Knew About (Until I Read ALL the Docs!)
Even after years of working with Laravel, I thought I knew it all... until I didn't! I decided to read through the ENTIRE Laravel documentation, and wow - I'm honestly amazed at what I discovered.
In this video, I'm sharing 20 features that caught me completely…
In this video, I'm sharing 20 features that caught me completely…
Is route:cache enough for mostly-static websites?
I'm working on a small e-commerce website that sells 7 products in total. Which gets the products from the database. And the data doesn't change often (if at all).
So, what kind of caching method would you recommend for this? Do I use something like
https://redd.it/1joc2ju
@r_php
I'm working on a small e-commerce website that sells 7 products in total. Which gets the products from the database. And the data doesn't change often (if at all).
So, what kind of caching method would you recommend for this? Do I use something like
Cache::rememberforever and re-set the cache when model changes? Or would php artisan route:cache command be enough for this purpose?https://redd.it/1joc2ju
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Improving at Legacy Code
I don't know if this is the right place to ask this, but I've come to the conclusion that (entirely unintentionally) my career has made me specialise in Legacy code over the last few years.
However, I've been wondering what the best way is for me to get "better" at dealing with legacy code. I think it would be a nice skill to have on my CV if/when I move on to a new job, and likely something that will never be entirely useless. So far it's been mostly by accident but I wonder where I would go from here if I were more intentional about it.
(Apologies if this qualifies as "asking for help", I intend it mostly as a discussion and to hear from others in a similar position.)
https://redd.it/1jodq69
@r_php
I don't know if this is the right place to ask this, but I've come to the conclusion that (entirely unintentionally) my career has made me specialise in Legacy code over the last few years.
However, I've been wondering what the best way is for me to get "better" at dealing with legacy code. I think it would be a nice skill to have on my CV if/when I move on to a new job, and likely something that will never be entirely useless. So far it's been mostly by accident but I wonder where I would go from here if I were more intentional about it.
(Apologies if this qualifies as "asking for help", I intend it mostly as a discussion and to hear from others in a similar position.)
https://redd.it/1jodq69
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Vote: Facades, helpers, or pure DI?
\\"Pure\\" DI
Helper functions
Facade
What is your preferred way of doing it?
Please, elaborate.
https://redd.it/1jogk9u
@r_php
\\"Pure\\" DI
Helper functions
Facade
What is your preferred way of doing it?
Please, elaborate.
https://redd.it/1jogk9u
@r_php
PHP Crash Course by Matt Smith
I've been meaning to learn PHP for a while now, but life got in the way. I remember Jon Duckett, Program with Gio, and Laracasts as being much recommended sources to learn from. However, I also noticed a book that came out very recently: PHP Crash Course by Matt Smith. I like that it's recent and that it provides exercises with each chapter.
Does anyone here have experience with this book? Or does it seem like it focuses on the right subjects? There's a nice sample to look through at the link above.
https://redd.it/1jorxih
@r_php
I've been meaning to learn PHP for a while now, but life got in the way. I remember Jon Duckett, Program with Gio, and Laracasts as being much recommended sources to learn from. However, I also noticed a book that came out very recently: PHP Crash Course by Matt Smith. I like that it's recent and that it provides exercises with each chapter.
Does anyone here have experience with this book? Or does it seem like it focuses on the right subjects? There's a nice sample to look through at the link above.
https://redd.it/1jorxih
@r_php
NelmioApiDocBundle
Hi everyone, I’m using nelmio v5.0.1 with swagger v4.8.7 is there any way to create global parameters for route /api/ ? I have authentication by headers (Auth-Login and Auth-Password) and I don’t want to put it in every controller under /api/…
https://redd.it/1jot2le
@r_php
Hi everyone, I’m using nelmio v5.0.1 with swagger v4.8.7 is there any way to create global parameters for route /api/ ? I have authentication by headers (Auth-Login and Auth-Password) and I don’t want to put it in every controller under /api/…
https://redd.it/1jot2le
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community