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.
For a while now it has become “mandatory” to use SSL certificates to get the green lock on HTTPS. In this post you’ll see how to automatically issue free SSL certificates with Let’s Encrypt and FreeSSL.tech on shared hostings running cPanel.
There may be times when you’ll want your website or application to run commands while being served by IIS. In order to do so you’ll need to set permissions to the user that runs your website or application.
Conditional field validation with ParsleyJs
- Written by Luís Cruz on
- Este artigo está disponível em Português
In more complex forms it can be useful to validate one or more fields based on what the user selected on another field. For instance, make field A mandatory when the option X is selected and make the field B mandatory when the option Y is selected.
Manually set up DNS SRV record for Office 365
- Written by Luís Cruz on
- Este artigo está disponível em Português
It’s increasingly common to manage the emails of a company with cloud hosting services like Office 365 or Gmail and it’s natural to do so as it reduces the costs of maintaining the server and guarantees a stability to the service that might not exist when using proprietary or shared hosting.
Changing the email management service requires you to update the DNS records so emails are forward to the new server. Most of the times you just need to update MX record and the TXT
spv
record but when it comes down toSRV
records it might not be that simple.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.