Migrating from a legacy application and database
I am yet another old php developer looking at migrating a legacy application (internally developed framework) to Symfony.
I have found a bunch of threads on the topic but not much resolution and they were all fairly out of date. So I am hoping there is some more modern option.
The situation I have is I have an old application with hundreds of established database tables. They are well structured and have outside analytics tools that reference them. So I cannot change them.
Is there any way to get Symfony with one of the ORMs to be able to automatically generate the needed entity entries. I know there used to be doctrine:mapping:import but it looks like that was removed.
The additional tricky bit is that it is a commercial database (Informix) that is not natively supported by doctrine, though I did find an old github project that looks like it set up most of the mappings for it.
I am very open to any advice or just finding out if I am kind of out of luck without a lot of manual work.
https://redd.it/1m28nh2
@r_php
I am yet another old php developer looking at migrating a legacy application (internally developed framework) to Symfony.
I have found a bunch of threads on the topic but not much resolution and they were all fairly out of date. So I am hoping there is some more modern option.
The situation I have is I have an old application with hundreds of established database tables. They are well structured and have outside analytics tools that reference them. So I cannot change them.
Is there any way to get Symfony with one of the ORMs to be able to automatically generate the needed entity entries. I know there used to be doctrine:mapping:import but it looks like that was removed.
The additional tricky bit is that it is a commercial database (Informix) that is not natively supported by doctrine, though I did find an old github project that looks like it set up most of the mappings for it.
I am very open to any advice or just finding out if I am kind of out of luck without a lot of manual work.
https://redd.it/1m28nh2
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Ridiculously simple dependency injection (DI) container
https://github.com/Wilaak/PicoDI
https://redd.it/1m2b418
@r_php
https://github.com/Wilaak/PicoDI
https://redd.it/1m2b418
@r_php
GitHub
GitHub - Wilaak/PicoDI: The ridiculously simple dependency injection (DI) container for PHP.
The ridiculously simple dependency injection (DI) container for PHP. - Wilaak/PicoDI
advice on developing PHP architecture skills
I have been developing small plugins for Wordpress and it has been ok building small plugins that do a couple of task. But my desire is to build bigger more complex plugins.
* So I started by watching Alecadd plugin tutorial on Youtube, this was good introduction,
* Then I read the Wordpress plugin handbook, which gives ideas in what to do but is not a tutorial
* Then I download several plugins and started studying code, but each plugin is different and there is not comments explaining architecture decision
My goal is to build very efficient plugins, but learning good architecture is hard, all tutorials I know don't teach architecture, just syntax and concepts. Can the community help? Any advice. Thank you
https://redd.it/1m2efl0
@r_php
I have been developing small plugins for Wordpress and it has been ok building small plugins that do a couple of task. But my desire is to build bigger more complex plugins.
* So I started by watching Alecadd plugin tutorial on Youtube, this was good introduction,
* Then I read the Wordpress plugin handbook, which gives ideas in what to do but is not a tutorial
* Then I download several plugins and started studying code, but each plugin is different and there is not comments explaining architecture decision
My goal is to build very efficient plugins, but learning good architecture is hard, all tutorials I know don't teach architecture, just syntax and concepts. Can the community help? Any advice. Thank you
https://redd.it/1m2efl0
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
I made an open source shell to enrich Laravel Tinker
If you’ve ever dove headfirst into a production server at 2 a.m., opened up **Laravel Tinker**, pasted a half‑forgotten piece of code from Slack just to fix a client’s data… you know the pain that introduced this project:
* **Copy‑paste roulette:** I maintained a personal graveyard of "maintenance noscripts" spread all over notes, Gists, and chat histories. Whenever something was broken, I searched for the appropriate one, adjusted a variable, hoped I didn't fat‑finger anything, and pressed enter.
* **Zero visibility:** I’d shoot off another throw-away fragment after patching to verify the system was *actually* healthy. It was impossible to find a single location to review *all* the relevant checks before and after executing code.
* **Production paranoia:** Tinker is powerful, but one wrong command can mangle live data. There’s no guard‑rail, no categorisation, no history you can audit later.
I soon came to my senses: *this workflow is a liability*, not a tool. I needed something custom‑built.
What if there were:
1. A **dedicated shell** that bootstraps the complete Laravel context.
2. A first‑class **noscript repository**: version‑controlled, discoverable, grouped by domain
3. **System checks** that can be executed before or after a noscript, with one command, and which return a definite OK/FAIL report.
4. **Safe mode** that refuses to do anything reckless when `APP_ENV=production`—unless you explicitly allow it.
That idea became **NodiShell**
# What NodiShell really solves
|Issue|How NodiShell resolves it|
|:-|:-|
|Scripts spread throughout chat, Gists, sticky notes|**Category‑based repository** (`app/Console/NodiShell/Scripts`) with autocomplete searching|
|Manual copy‑paste into Tinker|**Interactive menu** – arrow‑key navigation, fuzzy search, one‑hit execution|
|No repeatable health checks|**Pluggable system checks** (DB, cache, queues, your own) with colour‑coded results|
|Risky production changes|**Built‑in safety layer** (`--safe-mode`, `isProductionSafe()`) and confirm prompts|
|Losing context between noscripts|**Session-wide variable store** injected directly into Tinker|
That is, Tinker **with discipline**.
# Under the hood
* **Laravel native** – install with `composer require nodilabs/nodishell`.
* **Generator commands** – `php artisan nodishell:noscript` scaffolds a skeleton with type hints, docblocks, and error‑handling baked in.
* **Customisable UI** – emoji icons, colour themes and sort order so your ops team actually enjoys using it.
* **Autodiscovery** – put a PHP class somewhere under the `Scripts`, `Categories` or `Checks` dir, NodiShell finds it automatically, without service‑provider contortions.
# A 30-second Example
# run a one‑off repair
php artisan nodishell --noscript=reset-user-password
# or open the menu
php artisan nodishell
Select **“Maintenance → Reset User Password”**, enter the user’s email, and NodiShell fires the noscript, shows a success banner and leaves the result in `$lastResult`—ready for inspection in Tinker.
# Try it
composer require nodilabs/nodishell
php artisan vendor:publish --provider="NodiLabs\NodiShell\NodiShellServiceProvider"
php artisan nodishell
Five minutes and your first maintenance noscript will be executing & no more copy‑paste anxiety. Test it, feedbacks and PRs are always welcome!
Repository link: [https://github.com/nodilabs/nodishell](https://github.com/nodilabs/nodishell)
https://redd.it/1m2fjip
@r_php
If you’ve ever dove headfirst into a production server at 2 a.m., opened up **Laravel Tinker**, pasted a half‑forgotten piece of code from Slack just to fix a client’s data… you know the pain that introduced this project:
* **Copy‑paste roulette:** I maintained a personal graveyard of "maintenance noscripts" spread all over notes, Gists, and chat histories. Whenever something was broken, I searched for the appropriate one, adjusted a variable, hoped I didn't fat‑finger anything, and pressed enter.
* **Zero visibility:** I’d shoot off another throw-away fragment after patching to verify the system was *actually* healthy. It was impossible to find a single location to review *all* the relevant checks before and after executing code.
* **Production paranoia:** Tinker is powerful, but one wrong command can mangle live data. There’s no guard‑rail, no categorisation, no history you can audit later.
I soon came to my senses: *this workflow is a liability*, not a tool. I needed something custom‑built.
What if there were:
1. A **dedicated shell** that bootstraps the complete Laravel context.
2. A first‑class **noscript repository**: version‑controlled, discoverable, grouped by domain
3. **System checks** that can be executed before or after a noscript, with one command, and which return a definite OK/FAIL report.
4. **Safe mode** that refuses to do anything reckless when `APP_ENV=production`—unless you explicitly allow it.
That idea became **NodiShell**
# What NodiShell really solves
|Issue|How NodiShell resolves it|
|:-|:-|
|Scripts spread throughout chat, Gists, sticky notes|**Category‑based repository** (`app/Console/NodiShell/Scripts`) with autocomplete searching|
|Manual copy‑paste into Tinker|**Interactive menu** – arrow‑key navigation, fuzzy search, one‑hit execution|
|No repeatable health checks|**Pluggable system checks** (DB, cache, queues, your own) with colour‑coded results|
|Risky production changes|**Built‑in safety layer** (`--safe-mode`, `isProductionSafe()`) and confirm prompts|
|Losing context between noscripts|**Session-wide variable store** injected directly into Tinker|
That is, Tinker **with discipline**.
# Under the hood
* **Laravel native** – install with `composer require nodilabs/nodishell`.
* **Generator commands** – `php artisan nodishell:noscript` scaffolds a skeleton with type hints, docblocks, and error‑handling baked in.
* **Customisable UI** – emoji icons, colour themes and sort order so your ops team actually enjoys using it.
* **Autodiscovery** – put a PHP class somewhere under the `Scripts`, `Categories` or `Checks` dir, NodiShell finds it automatically, without service‑provider contortions.
# A 30-second Example
# run a one‑off repair
php artisan nodishell --noscript=reset-user-password
# or open the menu
php artisan nodishell
Select **“Maintenance → Reset User Password”**, enter the user’s email, and NodiShell fires the noscript, shows a success banner and leaves the result in `$lastResult`—ready for inspection in Tinker.
# Try it
composer require nodilabs/nodishell
php artisan vendor:publish --provider="NodiLabs\NodiShell\NodiShellServiceProvider"
php artisan nodishell
Five minutes and your first maintenance noscript will be executing & no more copy‑paste anxiety. Test it, feedbacks and PRs are always welcome!
Repository link: [https://github.com/nodilabs/nodishell](https://github.com/nodilabs/nodishell)
https://redd.it/1m2fjip
@r_php
GitHub
GitHub - nodilabs/nodishell: Laravel Interactive Shell with Script Repository and Tinker integration
Laravel Interactive Shell with Script Repository and Tinker integration - nodilabs/nodishell
Why did Laravel make translations file-based by default
Hi,
I've been programming Laravel for 5 years - I program a bilingual app, but I'm in America and our customers are in France -
I'm still learning a lot, but one thing that has been a nightmare for our project is translations -
Right now, we have a Caffeinated based module system, with a Lang folder for each module, along with en and fr for translations. I know that Caffeinated is outdated, but Nwidart apparently has a similar problem -
Apparently in Laravel, translations are taken from files by default, and there is no out of the box system for managing localization in the Database. Maybe I missed something... but when I use trans or __(), it seems like it is directly going to the file system.
This means that translations have now become a part of the source code... which I guess it makes sense, because it's the developers who come with new ideas for views, widgets, alerts, etc - which require new messages but it puts the responsibility on us to manage translations, since translations now have to be tracked by Git.
I'm not sure how much easier translations would be with a Database one or if that is even possible... but it seems like pushing this issue to git seems like it creates an unnecessary problem. It seems like having an easy way to export and import translations via the Database would be the easiest thing.
I'm a sole developer so it's not that bad, but every time my boss needs to make production specific changes to different servers running the same app... it's like you missed this translation, you missed that translation, etc.
On top of that with Docker, deployments don't even preserve changes made by users to those translation files. So now we have mutability in the file system -
So I'm just wondering if I'm missing something, how others solve this problem, how Laravel intended this problem to be addressed. I know there are libraries that handle localization for models - but not so much for features and structural parts of the app.
https://redd.it/1m2esah
@r_php
Hi,
I've been programming Laravel for 5 years - I program a bilingual app, but I'm in America and our customers are in France -
I'm still learning a lot, but one thing that has been a nightmare for our project is translations -
Right now, we have a Caffeinated based module system, with a Lang folder for each module, along with en and fr for translations. I know that Caffeinated is outdated, but Nwidart apparently has a similar problem -
Apparently in Laravel, translations are taken from files by default, and there is no out of the box system for managing localization in the Database. Maybe I missed something... but when I use trans or __(), it seems like it is directly going to the file system.
This means that translations have now become a part of the source code... which I guess it makes sense, because it's the developers who come with new ideas for views, widgets, alerts, etc - which require new messages but it puts the responsibility on us to manage translations, since translations now have to be tracked by Git.
I'm not sure how much easier translations would be with a Database one or if that is even possible... but it seems like pushing this issue to git seems like it creates an unnecessary problem. It seems like having an easy way to export and import translations via the Database would be the easiest thing.
I'm a sole developer so it's not that bad, but every time my boss needs to make production specific changes to different servers running the same app... it's like you missed this translation, you missed that translation, etc.
On top of that with Docker, deployments don't even preserve changes made by users to those translation files. So now we have mutability in the file system -
So I'm just wondering if I'm missing something, how others solve this problem, how Laravel intended this problem to be addressed. I know there are libraries that handle localization for models - but not so much for features and structural parts of the app.
https://redd.it/1m2esah
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
"clone with" functionality is coming to PHP 8.5!
https://wiki.php.net/rfc/clone_with_v2
https://redd.it/1m2ufsl
@r_php
https://wiki.php.net/rfc/clone_with_v2
https://redd.it/1m2ufsl
@r_php
I used create instead of updateOrCreate in a job that was updating a report every 30 mins
https://redd.it/1m2wwze
@r_php
https://redd.it/1m2wwze
@r_php
Global objects
In practice, how do you implement global objects/services that should be available at any part of the web (Logger, Session, CurrentUser, Database, etc.)? DIC, manual injection into all classes, global functions, access via global keyword, ... ?
https://redd.it/1m375kx
@r_php
In practice, how do you implement global objects/services that should be available at any part of the web (Logger, Session, CurrentUser, Database, etc.)? DIC, manual injection into all classes, global functions, access via global keyword, ... ?
https://redd.it/1m375kx
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Why I'm not using Livewire any more - magic vs bloat.
I’ve been re-evaluating my frontend stack for Laravel apps, especially where interactivity meets performance. Livewire is impressive in terms of ease of use, especially when building UI without needing to write a lot of custom JavaScript. But once the complexity of the component increases, especially with large datasets or model relationships, I’ve noticed serious trade-offs in how Livewire handles state.
Because Livewire serializes the entire component context on each update, even a small interaction can lead to an AJAX request containing megabytes of data especially if you're binding large collections or Eloquent models with relationships. In some cases, I’ve seen request payloads in the 2–5MB range, just to handle a single button click or toggle.
This raises some questions for the community:
* How are others approaching this problem?
* Are there patterns or best practices for using Livewire in data-heavy components without bloating payloads?
* At what point do you opt out of Livewire in favour of something like Alpine + API endpoints, or Inertia/Vue?
I still think Livewire is great for form workflows and simple UIs, but for anything involving complex or high-volume data, I’m questioning whether it's the right tool. Curious to hear how others have approached this — whether you’ve optimized around it or moved to other approaches entirely.
https://redd.it/1m34wk8
@r_php
I’ve been re-evaluating my frontend stack for Laravel apps, especially where interactivity meets performance. Livewire is impressive in terms of ease of use, especially when building UI without needing to write a lot of custom JavaScript. But once the complexity of the component increases, especially with large datasets or model relationships, I’ve noticed serious trade-offs in how Livewire handles state.
Because Livewire serializes the entire component context on each update, even a small interaction can lead to an AJAX request containing megabytes of data especially if you're binding large collections or Eloquent models with relationships. In some cases, I’ve seen request payloads in the 2–5MB range, just to handle a single button click or toggle.
This raises some questions for the community:
* How are others approaching this problem?
* Are there patterns or best practices for using Livewire in data-heavy components without bloating payloads?
* At what point do you opt out of Livewire in favour of something like Alpine + API endpoints, or Inertia/Vue?
I still think Livewire is great for form workflows and simple UIs, but for anything involving complex or high-volume data, I’m questioning whether it's the right tool. Curious to hear how others have approached this — whether you’ve optimized around it or moved to other approaches entirely.
https://redd.it/1m34wk8
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Full Stack Procedural PHP Dev Wanted – U.S.-Based Engineer to Help Scale CRM/Web Builder SaaS (42 Clients)
Hey guys,
I'm the founder of a small web design firm that has turned into a mini SaaS company. It's a LAMP-based SaaS (CRM + web builder) with 42 paying customers. It started as a small digital studio project and evolved into a full-fledged product with over 1M lines of **procedural PHP**. It’s almost profitable but I urgently need the right engineer to help maintain, modernize, and grow it. I'm a designer and do some front end/backend/server - but not may background.
Had we known we would become a SaaS model would have used other technology - but that's hindsight.
**Tech stack:**
* Loose MVC - Procedural PHP (no Laravel, Symfony, Cake, etc. raw php)
* CentOS / Apache / MySQL
* HTML/CSS/jQuery
* Bonus: UI/UX skills to help clean up the front end
I’ve tried a couple freelancers, some were great but overcommitted, others were just chasing hourly gigs. I’m looking for someone reliable, collaborative, and long-term. Not a dev shop. Not a hit-and-run gig seeker. If you can setup my stack in a local environment - we're on our way.
**This might be a fit if you:**
* Are a **U.S.-based** developer and fluent native English speaker
* Can hop on screenshares occasionally to help me flesh out specs live
* Don’t need every task written out, you're comfortable taking notes and thinking through problems during a call
* Communicate clearly and work independently
* Like owning a codebase and making it better over time
**Compensation:**
* Negotiable pay upfront (bootstrapped, no VC)
* But for the right person: *more hours, more pay, and potential equity,* happy to discuss privately
This is not a flip or cash grab. I’m not giving up on this product, but I can’t scale without dependable support.
If you're looking to be part of something with traction and real ownership, let’s talk. DMs open.
https://redd.it/1m39b6e
@r_php
Hey guys,
I'm the founder of a small web design firm that has turned into a mini SaaS company. It's a LAMP-based SaaS (CRM + web builder) with 42 paying customers. It started as a small digital studio project and evolved into a full-fledged product with over 1M lines of **procedural PHP**. It’s almost profitable but I urgently need the right engineer to help maintain, modernize, and grow it. I'm a designer and do some front end/backend/server - but not may background.
Had we known we would become a SaaS model would have used other technology - but that's hindsight.
**Tech stack:**
* Loose MVC - Procedural PHP (no Laravel, Symfony, Cake, etc. raw php)
* CentOS / Apache / MySQL
* HTML/CSS/jQuery
* Bonus: UI/UX skills to help clean up the front end
I’ve tried a couple freelancers, some were great but overcommitted, others were just chasing hourly gigs. I’m looking for someone reliable, collaborative, and long-term. Not a dev shop. Not a hit-and-run gig seeker. If you can setup my stack in a local environment - we're on our way.
**This might be a fit if you:**
* Are a **U.S.-based** developer and fluent native English speaker
* Can hop on screenshares occasionally to help me flesh out specs live
* Don’t need every task written out, you're comfortable taking notes and thinking through problems during a call
* Communicate clearly and work independently
* Like owning a codebase and making it better over time
**Compensation:**
* Negotiable pay upfront (bootstrapped, no VC)
* But for the right person: *more hours, more pay, and potential equity,* happy to discuss privately
This is not a flip or cash grab. I’m not giving up on this product, but I can’t scale without dependable support.
If you're looking to be part of something with traction and real ownership, let’s talk. DMs open.
https://redd.it/1m39b6e
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Working with excel and php
Hi there!
Can anyone please give me some pointers on reading, writing and modifying excel files using php.
Thanks in advance!
https://redd.it/1m38rc6
@r_php
Hi there!
Can anyone please give me some pointers on reading, writing and modifying excel files using php.
Thanks in advance!
https://redd.it/1m38rc6
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Starting a project
I am making software for someone... I am attempting to use Laravel Livewire with Flux pro components and Tailwind css.
I am on windows 11, with nginx (latest), postgres 17, laravel 12, php 8.3 Fast CGI PHP, Flux pro2, using vite for building stuff. I am not using php artisan server I am runnig straight under nginx.
It is turtle slow. takes me about 2.5 seconds to load up a page that is for a logged in user.
Manage User Component page
3 column division
1. has a list of of users right now only 1 user in that list in the main page
2. has 1 livewire component that shows user details and permissions so only hits db for 2 tables.
3. has 1 livewire component with static summaries that have fake output. Meaning no db hits just showing simulated data.
PHP ini I turned off xdebug
PHP ini I turned on Opcache
And I am still getting
12 requests 3.2 MB transferred 4.7 MB resources Finish: 2.41 sDOMContentLoaded: 2.10 sLoad: 2.23 s
Now some of that resources are stuff like last pass that inserts in when serving a page but even turning that off doesn't do anything.
The manage user page which is only 61K takes 1.52 seconds to load. WTF?
I spent 30 years in the microsoft tech stack. I am sick of it was looking for a better experience programming. So I been trying out different tech stacks. I like laravel. I love livewire.
But I really hate the performance I am seeing on something that is a very simple page.
I have no doubt I might be missing something. But I have researched through articles and asked AI and haven't come up with anything that helped except taking away xdebug which took the total serving time from 4.25 seconds to 2.41 seconds that I have now.
Any help would be appreciated. Or is this the performance to expect from livewire or laravel?
Edit: This is just discouraging. I was so happy to see livewire it is similiar to blazor in .net which I liked the concept. I know laracasts runs on laravel and has good performance.
https://redd.it/1m3jzx3
@r_php
I am making software for someone... I am attempting to use Laravel Livewire with Flux pro components and Tailwind css.
I am on windows 11, with nginx (latest), postgres 17, laravel 12, php 8.3 Fast CGI PHP, Flux pro2, using vite for building stuff. I am not using php artisan server I am runnig straight under nginx.
It is turtle slow. takes me about 2.5 seconds to load up a page that is for a logged in user.
Manage User Component page
3 column division
1. has a list of of users right now only 1 user in that list in the main page
2. has 1 livewire component that shows user details and permissions so only hits db for 2 tables.
3. has 1 livewire component with static summaries that have fake output. Meaning no db hits just showing simulated data.
PHP ini I turned off xdebug
PHP ini I turned on Opcache
And I am still getting
12 requests 3.2 MB transferred 4.7 MB resources Finish: 2.41 sDOMContentLoaded: 2.10 sLoad: 2.23 s
Now some of that resources are stuff like last pass that inserts in when serving a page but even turning that off doesn't do anything.
The manage user page which is only 61K takes 1.52 seconds to load. WTF?
I spent 30 years in the microsoft tech stack. I am sick of it was looking for a better experience programming. So I been trying out different tech stacks. I like laravel. I love livewire.
But I really hate the performance I am seeing on something that is a very simple page.
I have no doubt I might be missing something. But I have researched through articles and asked AI and haven't come up with anything that helped except taking away xdebug which took the total serving time from 4.25 seconds to 2.41 seconds that I have now.
Any help would be appreciated. Or is this the performance to expect from livewire or laravel?
Edit: This is just discouraging. I was so happy to see livewire it is similiar to blazor in .net which I liked the concept. I know laracasts runs on laravel and has good performance.
https://redd.it/1m3jzx3
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Who's hiring/looking
This is a bi-monthly thread aimed to connect PHP companies and developers who are hiring or looking for a job.
Rules
No recruiters
Don't share any personal info like email addresses or phone numbers in this thread. Contact each other via DM to get in touch
If you're hiring: don't just link to an external website, take the time to describe what you're looking for in the thread.
If you're looking: feel free to share your portfolio, GitHub, … as well. Keep into account the personal information rule, so don't just share your CV and be done with it.
https://redd.it/1m3qqfx
@r_php
This is a bi-monthly thread aimed to connect PHP companies and developers who are hiring or looking for a job.
Rules
No recruiters
Don't share any personal info like email addresses or phone numbers in this thread. Contact each other via DM to get in touch
If you're hiring: don't just link to an external website, take the time to describe what you're looking for in the thread.
If you're looking: feel free to share your portfolio, GitHub, … as well. Keep into account the personal information rule, so don't just share your CV and be done with it.
https://redd.it/1m3qqfx
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
CVE-2025-54068 (9.2/10) - Livewire v3 is vulnerable to remote command execution during component property update hydration
https://github.com/advisories/GHSA-29cq-5w36-x7w3
https://redd.it/1m3xbk8
@r_php
https://github.com/advisories/GHSA-29cq-5w36-x7w3
https://redd.it/1m3xbk8
@r_php
GitHub
CVE-2025-54068 - GitHub Advisory Database
Livewire is vulnerable to remote command execution during component property update hydration
Testing Laravel Sanctum SPA auth in Postman (CSRF + session login)
I’ve seen a few tutorials about getting Laravel Sanctum working with Postman (mostly video or blog form), but I figured I’d write a proper GitHub README version — something minimal and straight to the point.
Here’s the repo:
https://github.com/maikeru-desu/postman-laravel-sanctum-auth
It covers:
Setting up your Postman environment
Getting the CSRF cookie
Adding a pre-request noscript that handles `X-XSRF-TOKEN` \+ `Referer`
Making sure protected routes work without hitting auth errors
Main goal was just to make it easier to test Sanctum like a frontend SPA would — without needing to run your React/Vue app.
Hope it helps someone. Feel free to suggest improvements too.
Star it if you find it useful! 👍
https://redd.it/1m40zko
@r_php
I’ve seen a few tutorials about getting Laravel Sanctum working with Postman (mostly video or blog form), but I figured I’d write a proper GitHub README version — something minimal and straight to the point.
Here’s the repo:
https://github.com/maikeru-desu/postman-laravel-sanctum-auth
It covers:
Setting up your Postman environment
Getting the CSRF cookie
Adding a pre-request noscript that handles `X-XSRF-TOKEN` \+ `Referer`
Making sure protected routes work without hitting auth errors
Main goal was just to make it easier to test Sanctum like a frontend SPA would — without needing to run your React/Vue app.
Hope it helps someone. Feel free to suggest improvements too.
Star it if you find it useful! 👍
https://redd.it/1m40zko
@r_php
GitHub
GitHub - maikeru-desu/postman-laravel-sanctum-auth
Contribute to maikeru-desu/postman-laravel-sanctum-auth development by creating an account on GitHub.
Year 0 php dev ,the things one should focus on in their first year to lay a solid groundwork
what should i be learning in my "zero" year??
https://redd.it/1m49j4n
@r_php
what should i be learning in my "zero" year??
https://redd.it/1m49j4n
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
CancerStan: My Attempt at autofixing PHPStan errors
I really hate tools that only cry and don't fix "obvious" cases. So i tried to do it myself.
Doesn't cover much cases yet but i've had some fun trying to autodetermine types and building it in general :p
https://github.com/tetreum/cancerstan
https://redd.it/1m4kivu
@r_php
I really hate tools that only cry and don't fix "obvious" cases. So i tried to do it myself.
Doesn't cover much cases yet but i've had some fun trying to autodetermine types and building it in general :p
https://github.com/tetreum/cancerstan
https://redd.it/1m4kivu
@r_php
GitHub
GitHub - tetreum/cancerstan: Fix some PHPStan errors automatically
Fix some PHPStan errors automatically. Contribute to tetreum/cancerstan development by creating an account on GitHub.