Luís NóbregaLaravel: How to serve requests with HTML and JSON (with DRY)One of the common problems of a web application is the need to return HTML and JSON to a request. Why? Imagine we have a SPA who needs the…Jan 2, 2021Jan 2, 2021
Luís NóbregaLaravel: Using Unsplash API with a Service Layer and DTOsIn this tutorial, I will show you a way of architecture a Service Layer in Laravel, to interact with the Unsplash API. The Service Layer…Oct 17, 20201Oct 17, 20201
Luís NóbregaLaravel Model attributes in camelCase. Two ways to have it.In this article, I will talk about how to have camelCase properties in Eloquent models. Let’s see these two ways.Sep 2, 2020Sep 2, 2020
Luís NóbregaLaravel Repositories: An how-to exampleThis layer can be between the domain and the database and provides access to data.Jul 31, 2020Jul 31, 2020
Luís NóbregaLaravel Desktop Application: Electron and SQLite to building an offline contacts managerOr do you have a web app? You can also turn it into a desktop application!May 2, 20201May 2, 20201
Luís NóbregaLaravel: Service Layer with DTOs and ValidatorsExample of how to have a Service Layer with DTOs using Laravel Validator.Apr 30, 20201Apr 30, 20201
Luís NóbregaLaravel: How to move FAT logic to the Model layerWhy we should avoid FAT Controllers, and how to structure the Model layer in Laravel.Apr 26, 20201Apr 26, 20201
Luís NóbregaPHP: Client IP using __invoke and SRPLet’s get the unsafe client IP using invokes and complying with the SRP.Apr 24, 2020Apr 24, 2020
Luís NóbregamacOS: Built-in Web Server with several PHP versions and XdebugI will show you how to have several PHP versions installed in macOS, and use them with the built-in web server, having also Xdebug…Apr 18, 2020Apr 18, 2020
Luís NóbregaHeroku Logging Best Practices: A guide to log and troubleshootingLogging is just something I’m used to, and I don’t recall when I started to use it and noticed its importance.Mar 9, 20201Mar 9, 20201