Suggest a best template for building a SDK PHP/Laravel ?
hi,
i recently launched a web screenshot API, i am looking for a template to create a PHP/Laravel SDK for my API, i am good In JavaScript, Haven't used PHP in last few years, can anyone suggest a starter template for a SDK.
https://redd.it/1jbbdbd
@r_php
hi,
i recently launched a web screenshot API, i am looking for a template to create a PHP/Laravel SDK for my API, i am good In JavaScript, Haven't used PHP in last few years, can anyone suggest a starter template for a SDK.
https://redd.it/1jbbdbd
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
PHP RFC: Optional interfaces
https://wiki.php.net/rfc/optional-interfaces
https://redd.it/1jbcbtx
@r_php
https://wiki.php.net/rfc/optional-interfaces
https://redd.it/1jbcbtx
@r_php
I took the PHPill
For a while now my default way of building full stack web apps has been Flask + Sqlite + Whatever frontend I felt like. This usualy resulted in bloated, JS-full unmainanble mess. I have dabbled in using Go (Excellent) and Rust (Too type-happy) for my back-end but my front-end usually ended up being the thing that dragged me down. A minor epiphany of mine was discovering HTMX. But recently I got my mind blown by one of my friends who made a whole "smart map" (won't get into more detail) app whilst staying entirely Web 1.0 compliant. This prompted me to try PHP (though she was also using Flask but I didn't know it).
Honestly, the most fun I've had programming in years. In the span of an hour I had made a simple bulletin board app with nothing but html, PHP and SQL. It just blew my mind that you could put the code relevant to a page in the page rather than using templating (though I must concede that Jinja is excellent). I even started to re-learn all of the HTML that years of ChatGPT copy-pasting made me forget. You also get all of the benefits that Go has as a Web first language: the session system just blew my damn mind the first time around: I had no idea cookies without JavaScript were even a thing. Not dreading the inevitable JS blunders or the slog of having to find what part of my code is relevant was awesome.
Plus, I'm not a big framework guy, I don't like using Rails or the likes (Flask is still too pushy for me at times), so I was scared at first that Laravel was a requirement but raw, pure PHP just work, it clicked in my brain, the syntax (apart from the semicolons that aren't used for anything interesting) just clicked with me. Don't even get me started with arrays, its like they copied Lua in advance.
Anyway, what I mean to say is that PHP is a fast, easy to use, and sensical language everyone should absolutely give a shot to. I will definitely be using it in every single one of my projects for the foreseeable future.
https://redd.it/1jbe066
@r_php
For a while now my default way of building full stack web apps has been Flask + Sqlite + Whatever frontend I felt like. This usualy resulted in bloated, JS-full unmainanble mess. I have dabbled in using Go (Excellent) and Rust (Too type-happy) for my back-end but my front-end usually ended up being the thing that dragged me down. A minor epiphany of mine was discovering HTMX. But recently I got my mind blown by one of my friends who made a whole "smart map" (won't get into more detail) app whilst staying entirely Web 1.0 compliant. This prompted me to try PHP (though she was also using Flask but I didn't know it).
Honestly, the most fun I've had programming in years. In the span of an hour I had made a simple bulletin board app with nothing but html, PHP and SQL. It just blew my mind that you could put the code relevant to a page in the page rather than using templating (though I must concede that Jinja is excellent). I even started to re-learn all of the HTML that years of ChatGPT copy-pasting made me forget. You also get all of the benefits that Go has as a Web first language: the session system just blew my damn mind the first time around: I had no idea cookies without JavaScript were even a thing. Not dreading the inevitable JS blunders or the slog of having to find what part of my code is relevant was awesome.
Plus, I'm not a big framework guy, I don't like using Rails or the likes (Flask is still too pushy for me at times), so I was scared at first that Laravel was a requirement but raw, pure PHP just work, it clicked in my brain, the syntax (apart from the semicolons that aren't used for anything interesting) just clicked with me. Don't even get me started with arrays, its like they copied Lua in advance.
Anyway, what I mean to say is that PHP is a fast, easy to use, and sensical language everyone should absolutely give a shot to. I will definitely be using it in every single one of my projects for the foreseeable future.
https://redd.it/1jbe066
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Explicit nullable type vs Type Hinting
Are there any technical differences between these?
and:
https://redd.it/1jbh2ok
@r_php
Are there any technical differences between these?
public function Foo(?int $int = null) {}and:
public function Foo(int|null $int) {}https://redd.it/1jbh2ok
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How would be a MMORPG game using PHP and Symfony?
https://postimg.cc/62bsLQtz
https://redd.it/1jbhr76
@r_php
https://postimg.cc/62bsLQtz
https://redd.it/1jbhr76
@r_php
postimg.cc
Schermata del 2025 03 14 21 46 45 — Postimages
Symfony vs Laravel - A humble request (Part 3)
https://clegginabox.co.uk/symfony-vs-laravel-a-humble-request-part-3/
https://redd.it/1jbhd4a
@r_php
https://clegginabox.co.uk/symfony-vs-laravel-a-humble-request-part-3/
https://redd.it/1jbhd4a
@r_php
Clegginabox
Symfony vs Laravel - A humble request (Part 3)
In this post I'll actually make some progress towards persisting our humble request. Before that I'm going to talk about a snake, to be more precise - Python.
Very early in my career I was really fortunate to work alongside a really experienced and patient…
Very early in my career I was really fortunate to work alongside a really experienced and patient…
Using AI for code reviews
Anyone using AI for PHP code reviews? If so, what are you using and how?
I've had a go at it using ChatGPT and my own custom prompts but feels clunky and quite manual. Can't help feeling that there's people out there that are doing it better.
https://redd.it/1jbsabn
@r_php
Anyone using AI for PHP code reviews? If so, what are you using and how?
I've had a go at it using ChatGPT and my own custom prompts but feels clunky and quite manual. Can't help feeling that there's people out there that are doing it better.
https://redd.it/1jbsabn
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Install Laravel 12 with Docker in 8 Minutes - Full Setup & Configuration Guide
https://youtu.be/ngGsX_Nv8n0?si=bmW2vFu3RYy0frqm
https://redd.it/1jbxxp4
@r_php
https://youtu.be/ngGsX_Nv8n0?si=bmW2vFu3RYy0frqm
https://redd.it/1jbxxp4
@r_php
YouTube
Install Laravel 12 with Docker in 8 Minutes - Full Setup & Configuration Guide #laravel #docker
In this video, I'll show you how to install Laravel 12 with Docker in just 8 minutes. Whether you're a beginner or have some experience with Docker, this guide will walk you through the entire process from start to finish.
I will cover the steps to set up…
I will cover the steps to set up…
Community Starter Kits GALLERY update
https://preview.redd.it/1t5x5t02uwoe1.png?width=1413&format=png&auto=webp&s=ebcc033f44461d4da12248a90f8c6db2b033187b
Hey ya!
Some of you might have seen my previous post about a project I was working on a couple days ago
Application here
>TLDR:
Laravel installer now supports community starter kits through the
This opensource platform aims to solve that by providing a central place to:
Discover community starter kits
Share starter kits with the community
Since that post, I've made a few additions, including:
☑ Tags to filter through available starterkits (e.g. stripe, vue etc..)
☑ Bookmark your favourites
☑ Ranking system based on number of bookmarks
☑ Layout changes and dark mode fixed
I want to keep the app as usable as possible, while keeping it pretty minimal.
So yeah, if you wanna try out the app or even submit your favourite starterkits, feel free!
If you want to report issues, or feature requests, you can either DM me, or do it via github, either one is fine!
Github ( feel free to star it :D )
https://redd.it/1jc3ys9
@r_php
https://preview.redd.it/1t5x5t02uwoe1.png?width=1413&format=png&auto=webp&s=ebcc033f44461d4da12248a90f8c6db2b033187b
Hey ya!
Some of you might have seen my previous post about a project I was working on a couple days ago
Application here
>TLDR:
Laravel installer now supports community starter kits through the
laravel new --using command. While this is a great feature, finding and evaluating different starter kits on GitHub can be time-consuming. This opensource platform aims to solve that by providing a central place to:
Discover community starter kits
Share starter kits with the community
Since that post, I've made a few additions, including:
☑ Tags to filter through available starterkits (e.g. stripe, vue etc..)
☑ Bookmark your favourites
☑ Ranking system based on number of bookmarks
☑ Layout changes and dark mode fixed
I want to keep the app as usable as possible, while keeping it pretty minimal.
So yeah, if you wanna try out the app or even submit your favourite starterkits, feel free!
If you want to report issues, or feature requests, you can either DM me, or do it via github, either one is fine!
Github ( feel free to star it :D )
https://redd.it/1jc3ys9
@r_php
Build an open-source project to help new people collaborate on PHP open source
I built this system using 'Good First Issue' as a reference, but instead of showing repositories, I prefer to show issues directly, focusing on the PHP language. What do you think about it? I'm new to the open-source world, and this is my first contribution.
Github repository : https://github.com/Danielopes7/php-contributing
Link: https://phpcontributing.com/
https://redd.it/1jcaplx
@r_php
I built this system using 'Good First Issue' as a reference, but instead of showing repositories, I prefer to show issues directly, focusing on the PHP language. What do you think about it? I'm new to the open-source world, and this is my first contribution.
Github repository : https://github.com/Danielopes7/php-contributing
Link: https://phpcontributing.com/
https://redd.it/1jcaplx
@r_php
GitHub
GitHub - Danielopes7/php-contributing: Friendly way to find new open source tasks to contribute
Friendly way to find new open source tasks to contribute - Danielopes7/php-contributing
A Week of Symfony #950 (March 10–16, 2025)
https://symfony.com/blog/a-week-of-symfony-950-march-10-16-2025?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1jci686
@r_php
https://symfony.com/blog/a-week-of-symfony-950-march-10-16-2025?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1jci686
@r_php
Symfony
A Week of Symfony #950 (March 10–16, 2025) (Symfony Blog)
This week, the upcoming Symfony 7.3 version updated lazy services to use PHP native lazy objects and added a feature to define global translation parameters. Meanwhile, the existing Symfony versions f…
Effortless Laravel & Inertia Data and Type Sync
Hey Laravel Devs 👋
If you're using Laravel with Inertia.js, you know the struggle of keeping your backend data structures and frontend TypeScript types in sync. It's tedious and error-prone.
Here's what you'll learn:
Backend configuration with Spatie Data
Frontend integration for automatic type generation
Tips and Tricks
https://www.alializadehdev.com/blogs/effortless-laravel-and-inertia-data-and-type-sync-dto-magic
https://redd.it/1jchvzv
@r_php
Hey Laravel Devs 👋
If you're using Laravel with Inertia.js, you know the struggle of keeping your backend data structures and frontend TypeScript types in sync. It's tedious and error-prone.
Here's what you'll learn:
Backend configuration with Spatie Data
Frontend integration for automatic type generation
Tips and Tricks
https://www.alializadehdev.com/blogs/effortless-laravel-and-inertia-data-and-type-sync-dto-magic
https://redd.it/1jchvzv
@r_php
Alializadehdev
Effortless Laravel & Inertia Data and Type Sync: DTO Magic | Ali Alizadeh
Stop manual data mapping! Discover how DTOs streamline type and data synchronization between Laravel and Inertia for faster development.
City State Registration
What is the best way to allow users selected a city once a state has been chosen during their user registration ? Is creating a City table referencing the state table feasible? Or would it be too large of a table and slow down website ?
https://redd.it/1jcjipj
@r_php
What is the best way to allow users selected a city once a state has been chosen during their user registration ? Is creating a City table referencing the state table feasible? Or would it be too large of a table and slow down website ?
https://redd.it/1jcjipj
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
A closer look at how Tempest handles discovery
https://tempestphp.com/blog/discovery-explained/
https://redd.it/1jcnil3
@r_php
https://tempestphp.com/blog/discovery-explained/
https://redd.it/1jcnil3
@r_php
Tempestphp
Tempest's Discovery explained — Tempest
A deep dive into the heart of Tempest.
What Can You Do with Laravel Middleware? (More Than You Think!)
https://backpackforlaravel.com/articles/tutorials/what-can-you-do-with-laravel-middleware-more-than-you-think
https://redd.it/1jcpn85
@r_php
https://backpackforlaravel.com/articles/tutorials/what-can-you-do-with-laravel-middleware-more-than-you-think
https://redd.it/1jcpn85
@r_php
Backpack for Laravel
What Can You Do with Laravel Middleware? (More Than You Think!)
Did you ever find yourself writing the same checks in multiple controllers? Like formatting inputs, blocking access, or tracking user a...
React.js in PHP?
I've been too preoccupied with whether I could, that I haven't cared the slightest about whether I should, and thus I've been chipping away at a PHP to JS transpiler which is now capable of just about enough that I have a very basic React.js app running in the browser, written in PHP.
This is the PHP code that makes it run: https://github.com/nomaphp/js/blob/main/examples/complex/react.php
This is the resulting JS: https://github.com/nomaphp/js/blob/main/examples/complex/react.js
And the whole thing put together: https://github.com/nomaphp/js/blob/main/examples/complex/test.php
So to be clear - it is not PHP running the front-end, it's JavaScript, but you write PHP which gets transpiled to JavaScript. My test example does run-time transpilation, but of course for performance reasons you'd probably want to cache it or just write the resulting JS into a .js file or something.
Been having a lot of fun with this! Why would anyone use this? Well for me the benefits are statically typed code (though you lose runtime validation of course) and the ability to share code, so if I have a utility function in PHP I can then also use the same exact function for my front-end. It's an extremely basic proof of concept, so don't think of it as anything serious just yet.
https://redd.it/1jcpbb8
@r_php
I've been too preoccupied with whether I could, that I haven't cared the slightest about whether I should, and thus I've been chipping away at a PHP to JS transpiler which is now capable of just about enough that I have a very basic React.js app running in the browser, written in PHP.
This is the PHP code that makes it run: https://github.com/nomaphp/js/blob/main/examples/complex/react.php
This is the resulting JS: https://github.com/nomaphp/js/blob/main/examples/complex/react.js
And the whole thing put together: https://github.com/nomaphp/js/blob/main/examples/complex/test.php
So to be clear - it is not PHP running the front-end, it's JavaScript, but you write PHP which gets transpiled to JavaScript. My test example does run-time transpilation, but of course for performance reasons you'd probably want to cache it or just write the resulting JS into a .js file or something.
Been having a lot of fun with this! Why would anyone use this? Well for me the benefits are statically typed code (though you lose runtime validation of course) and the ability to share code, so if I have a utility function in PHP I can then also use the same exact function for my front-end. It's an extremely basic proof of concept, so don't think of it as anything serious just yet.
https://redd.it/1jcpbb8
@r_php
GitHub
js/examples/complex/react.php at main · nomaphp/js
A PHP to JavaScript transpiler. Contribute to nomaphp/js development by creating an account on GitHub.
Shaping the Future of Laravel's API Starter Kit – What Should It Include?
Hey everyone!
With Laravel working on its own API starter kit, now is a great time for the community to define what a modern, well-architected REST API should look like. I’m starting a freelance project that involves building a large-scale REST API for a web and mobile ecosystem, as well as third-party integrations as a paid service. I want to align my approach with best practices and contribute to the broader discussion on what should be included in Laravel’s API tooling.
Here’s my initial list of must-have features:
* **JSON:API specification** as a baseline, with additional standards for dates (ISO 8601), country/currency codes, etc.
* **Stateless design** with proper HTTP verbs, status codes, semantic versioning in the URL, and cacheability (`Cache-Control`).
* **Rate limiting** to ensure fair usage and prevent abuse.
* **Comprehensive documentation** using OpenAPI.
* **CI/CD pipeline** with GitHub Actions for automated testing and deployment.
For those who have built APIs with Laravel, what else would you consider essential? What conventions, packages, or best practices should Laravel’s API starter kit include? Let’s make this a solid reference for modern API development in Laravel!
https://redd.it/1jcsh7k
@r_php
Hey everyone!
With Laravel working on its own API starter kit, now is a great time for the community to define what a modern, well-architected REST API should look like. I’m starting a freelance project that involves building a large-scale REST API for a web and mobile ecosystem, as well as third-party integrations as a paid service. I want to align my approach with best practices and contribute to the broader discussion on what should be included in Laravel’s API tooling.
Here’s my initial list of must-have features:
* **JSON:API specification** as a baseline, with additional standards for dates (ISO 8601), country/currency codes, etc.
* **Stateless design** with proper HTTP verbs, status codes, semantic versioning in the URL, and cacheability (`Cache-Control`).
* **Rate limiting** to ensure fair usage and prevent abuse.
* **Comprehensive documentation** using OpenAPI.
* **CI/CD pipeline** with GitHub Actions for automated testing and deployment.
For those who have built APIs with Laravel, what else would you consider essential? What conventions, packages, or best practices should Laravel’s API starter kit include? Let’s make this a solid reference for modern API development in Laravel!
https://redd.it/1jcsh7k
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Building a State-of-the-Art REST API – What would you include?
Hi there!
I'm starting a new freelance project (with Laravel) - a large-scale REST API designed to power an ecosystem of web and mobile applications, as well as serve third-party integrations as a paid service. My goal is to make this API state-of-the-art by implementing best practices from the start.
I'm compiling a list of essential features and design principles, and I'd love to hear your thoughts! If you were given a chance to build the next "perfect API", what would you include?
Here’s my initial list:
* **JSON:API specification** as the baseline, with additional standards for dates (ISO 8601), country/currency codes, etc.
* **Stateless design** with proper use of HTTP verbs, status codes, semantic versioning in the URL, and cacheability (via `Cache-Control`).
* **Rate limiting** to prevent abuse and ensure fair usage.
* **Comprehensive documentation** using OpenAPI.
* **CI/CD pipeline** with GitHub Actions for automated testing and deployment.
What would you add to this list? Any best practices, tools, or lessons learned from your own experience?
Thanks!
https://redd.it/1jcsb03
@r_php
Hi there!
I'm starting a new freelance project (with Laravel) - a large-scale REST API designed to power an ecosystem of web and mobile applications, as well as serve third-party integrations as a paid service. My goal is to make this API state-of-the-art by implementing best practices from the start.
I'm compiling a list of essential features and design principles, and I'd love to hear your thoughts! If you were given a chance to build the next "perfect API", what would you include?
Here’s my initial list:
* **JSON:API specification** as the baseline, with additional standards for dates (ISO 8601), country/currency codes, etc.
* **Stateless design** with proper use of HTTP verbs, status codes, semantic versioning in the URL, and cacheability (via `Cache-Control`).
* **Rate limiting** to prevent abuse and ensure fair usage.
* **Comprehensive documentation** using OpenAPI.
* **CI/CD pipeline** with GitHub Actions for automated testing and deployment.
What would you add to this list? Any best practices, tools, or lessons learned from your own experience?
Thanks!
https://redd.it/1jcsb03
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Weekly /r/Laravel Help Thread
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1jcq1wj
@r_php
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1jcq1wj
@r_php
Laravel
Installation - Laravel 12.x - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Q: AI to make php layout from word.doc
Like the noscript says. Is there an AI program, or any program/website that can convert a word.doc or PDF into a php ready web layout? I would map the back end parameters.
The source docs would be forms with check boxes and text fields.
I found a site that converts PDFs to HTML format but that didn't really help. I would need the layout.php ya?
Thanks all for any suggestions.
https://redd.it/1jcxgsq
@r_php
Like the noscript says. Is there an AI program, or any program/website that can convert a word.doc or PDF into a php ready web layout? I would map the back end parameters.
The source docs would be forms with check boxes and text fields.
I found a site that converts PDFs to HTML format but that didn't really help. I would need the layout.php ya?
Thanks all for any suggestions.
https://redd.it/1jcxgsq
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
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/1jd3bg8
@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/1jd3bg8
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community