data-transfer-object
Laravel
data-transfer-object | Laravel | |
---|---|---|
16 | 358 | |
2,177 | 76,934 | |
- | 0.4% | |
6.4 | 8.9 | |
over 1 year ago | 2 days ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
data-transfer-object
- Data-Mapper: A package for fast mapping of strong-typed objects
- brick/json-mapper: map JSON data to strongly typed PHP DTOs
-
A (very) small package to cast a variable to a new type, in including custom classes
Speaking of… https://github.com/spatie/data-transfer-object is dead, does doctrine offer similar functionality?
-
Given a messy class used _heavily_ with a hard time understanding whats going on... how to log stuff in testing / demo??
Once you are confident in the argument types, add them to the methods. If there are too many, create a Data Transfer Object. Also add method return types.
-
Refactoring #5: From arrays to Data Transfer Objects
The benefits of using DTOs are numerous, there's even a package from Spatie for them. See the package's release post and this awesome DTO explanation for a more in-depth take and how to implement and use them in a more sensible way.
-
Leveraging DTOs for JSON database columns as an alternative to additional tables
I opted to use Spatie's DTO package and a bit of additional custom code for easy casting. I decided to map each JSON column to its own DTO, so I created two classes for land and for army.
-
What are peoples thoughts/feelings regarding PHP attributes?
When possible, I surely will try using the spatie/data-transfer-object with attributes to see if I like it.
-
Workflow to keep CHANGELOG up-to-date with Release Notes
Open Source projects using this Action. Mostly my own projects, as I just released the Action. However, Spatie, a huge contributor to open source PHP packages recently added the workflow to their PHP package template; which makes me super proud ♥️
-
Restricting ORM objects to repository classes and DTOs
This spatie lib looks neat too, though it might not be all that static analysis friendly. I guess this doesn't save you from having two classes with the same properties. Seems like it could be worth a shot. Short of inventing a code generation tool I don't know how much better I can do.
- Autoload callback when certain class is called first time
Laravel
-
The PHP Orkestra Framework
Currently Laravel is the "go to" for new PHP applications to mostly developers today, if not, plain PHP, Slim, Symfony and other frameworks does the job, but for Wordpress, custom PHP boilerplates or/and outdated PHP patterns (aka, single ton) is what we have for work in mostly cases, if not, hacky ways to integrate frameworks as Laravel itself or parts of it to leverage a better code structure.
- ¿PHP, Muerto o No?
- Como configurar imagem Docker(PHP e Nginx) para projetos Laravel com PHP 8.3
-
Developing a Reusable and Readable Bash Script for Automated LAMP Stack Deployment
cd /var/www/ || handle_error "Failed to change directory to /var/www/." sudo git clone https://github.com/laravel/laravel.git laravel || handle_error "Failed to clone Laravel repository."
-
RESTful APIs with Laravel: Best Practices
Laravel is a popular PHP framework known for its expressive syntax and rich ecosystem of features. Here's why it shines for building RESTful APIs:
-
Mastering Application Security: The Power of Rate Limiting
Implementation In this article, we'll delve into the concept of rate limiting in Laravel; a popular PHP framework. We will explore how to set it up, customize it to suit your application's needs, and handle common scenarios. By the end, you'll have the knowledge and confidence to implement rate limiting in your Laravel applications, enhancing their security and stability.
-
From Beginner to Master: The Path to Becoming a PHP Guru
Delving into PHP frameworks like Laravel or Symfony is like building a skyscraper, with Composer acting as your "construction foreman," guiding you step by step to ensure your code is robust and awe-inspiring. This stage involves getting familiar with popular PHP frameworks such as Laravel, Symfony, CodeIgniter, etc., and utilizing the functionalities provided by these frameworks to rapidly develop efficient, maintainable web applications. Tools to consider: Laravel, Composer.
-
Laravel Roadmap
Your very first starting point should be the Laravel documentation. Known for its clear explanations and user-friendly layout, the Laravel documentation makes setup a breeze, ensuring you get off to the best possible start.
-
Creating GraphQL APIs with Laravel
In this tutorial, we will learn how to create a GraphQL API with Laravel, a popular PHP web framework. We will be creating a simple student model, seeding the database with dummy data, setting up a database connection, and creating a GraphQL server by defining our API's schema, queries, and mutations. We’ll also learn how to make requests to our API (test our endpoints) using a tool like Insomnia or Postman. By the end of this tutorial, you will have a working GraphQL API that you can continue to expand and improve.
-
Top 12 PHP Frameworks For Web Development in 2024
Laravel is an open-source PHP framework on GitHub with 75.7k stars and 24.2k forks used for building web applications. It was first released in 2011 and follows the Model-View-Controller (MVC) architecture. It comes with an expressive and elegant syntax. It is fine-tuned for building professional web applications and ready to handle enterprise workloads. It achieves this by integrating the best packages from the PHP ecosystem and creating a framework that is also developer-friendly. Other than its foundational features, It also provides tools for dependency injection, unit testing, real-time events, and many more.
What are some alternatives?
php-dto - A data transfer object inspired by Rust's serde
Spiral Framework - High-Performance PHP Framework
Serializer - Library for (de-)serializing data of any complexity (supports JSON, and XML)
Gin - Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
package-skeleton-laravel - A skeleton repository for Spatie's Laravel Packages
Slim Framework - Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
git-auto-commit-action - Automatically commit and push changed files back to GitHub with this GitHub Action for the 80% use case.
Slim - Slim Framework 4 Skeleton Application
fram - Fram is a view framework for PHP
Flask - The Python micro framework for building web applications.
Valinor - PHP library that helps to map any input into a strongly-typed value object structure.
tesseract-ocr-for-php - A wrapper to work with Tesseract OCR inside PHP.