Polymorphic relations give us a very useful flexibility is specific cases. In this article we’ll see how to proper eager load nested relations based on models with polymorphic relations using Laravel’s default ORM Eloquent.
PHP related articles
Integrate Multibanco payments with Easypay payment gateway
- Written by Luís Cruz on
- Este artigo está disponível em Português
Let’s see how we can create Multibanco payment references and how to fetch payment notifications when using the Portuguese Payment gateway Easypay.
Make sure you’ve read the previous article, and take a look at this package that we’ll use as a wrapper for our API requests to Easypay.
In this first article of a series I’ll show you the first steps to integrate Portuguese Easypay payment gateway with your software so you can use Multibanco and SEPA Direct Debit payments in an automated fashion.
You can expect to see what you should consider and take into account when you need to integrate Easypay with your software. What I’m writing here is a direct result from my personal experience with this payment gateway system.
Convert OpenDocument and OpenXML documents to PDF
- Written by Luís Cruz on
- Este artigo está disponível em Português
In the previous article I’ve introduced you to OpenTBS which is a class able to create and edit OpenXML and OpenDocument documents in PHP, extremely useful for report generation. But what if you need to provide the documents in PDF for the final users?
In this article I’ll demonstrate how you can convert OpenXML or (preferably) OpenDocument reports to PDF using LibreOffice or OpenOffice. All this using PHP.
Create OpenXML and OpenDocument reports with OpenTBS
- Written by Luís Cruz on
- Este artigo está disponível em Português
It’s a common requirement in web applications to be able to export data to the end users. The most common format is CSV but in more advanced applications you need a complex system that’s able to create reports with charts, tables and in a specific disposition for the users.
In this article I present TinyButStrong, and OpenTBS, that allow you to create and edit OpenXML and OpenDocument reports in PHP.
After the last article where I’ve shown how to consume WSDL Webservices with NTLM authentication, I present a particularity about that method.
The difficulty occurs when there’s more than one WSDL operation with the same name (that is, there are overloaded methods). When you don’t need NTLM authentication, the solution is rather simple, but when you do need NTLM authentication you need to be a little creative.
Consume SOAP Web Services with NTLM authentication in PHP
- Written by Luís Cruz on
- Este artigo está disponível em Português
To be able to consume SOAP web services with PHP you need to install the PHP-SOAP extension. However, the
SoapClient
class provided by that extension does not allow NTLM authentication.Before we go into the solution I would like to thank Thomas Rabaix for his blog post on March ‘08 about the subject. Indeed, his post is the real source for all the solutions online. If you hadn’t read the article I suggest you to do so.
Integrate SonarQube with TeamCity and Redmine
- Written by Luís Cruz on
- Este artigo está disponível em Português
For the past weeks I’ve wrote a series of articles on how to create a continuous integration server which began with the article Tools for a Continuous Integration (CI) server for PHP projects.
You can automate much more than what I’ve shown in this series of articles, specially front-end processes or automated tests and I hope you got to a point where you can investigate and start to tweak the continuous integration process to match your needs.
Analyse a Laravel 5 (PHP) project with SonarQube
- Written by Luís Cruz on
- Este artigo está disponível em Português
In the previous article we’ve installed SonarQube and SonarQube Runner. Now that we have the tools, let’s analyse the Laravel 5 project that we’ve created in the second article of “How to set up a Continuous Integration Server for PHP projects”.
This series or articles begun with the article Tools for a Continuous Integration (CI) server for PHP projects and teaches you how to create a continuous integration server from the scratch.
Install SonarQube and SonarQube Runner on Linux Mint
- Written by Luís Cruz on
- Este artigo está disponível em Português
One of the most neglected processes in Software Development is the ability to know how exactly is your project’s health. To do so you need a complex and periodic analysis to ensure your project’s maintenance is sustainable. There are several tools that help you to perform such analysis and among them is SonarQube.
In this article, which is part of the series “How to create a continuous integration server” and began with the article Tools for a Continuous Integration (CI) server, I’ll show you how to install and configure SonarQube and SonarQube Runner.