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…·4 min read·Jan 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…·6 min read·Oct 17, 2020--1--1
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.·3 min read·Sep 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.·4 min read·Jul 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!·7 min read·May 2, 2020--1--1
Luís NóbregaLaravel: Service Layer with DTOs and ValidatorsExample of how to have a Service Layer with DTOs using Laravel Validator.·7 min read·Apr 30, 2020--1--1
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.·6 min read·Apr 26, 2020--1--1
Luís NóbregaPHP: Client IP using __invoke and SRPLet’s get the unsafe client IP using invokes and complying with the SRP.·3 min read·Apr 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…·3 min read·Apr 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.·13 min read·Mar 9, 2020--1--1