Author: Rafael Wendel Pinheiro

Resolving the “Execution failed for task ‘: app: processDebugGoogleServices'”

I was developing a small project ( app for Android) in Cordova ( https://cordova.apache.org ), and this project one of the requirements was to send notifications push ( push notifications ) to the application through the Service Cloud Messaging  Google Firebase ( https://console.firebase.google.com ).

The procedure for implementing this task is relatively simple. Just access the Google Firebase console, create a new project, enter the information (name, package, etc …), configure it for Android and finally download the file google-services.json

Continue lendo

Respect / Relational – the simplest ORM framework for php

Basically all the main programming languages currently have ORM frameworks (Object Relational Mapping), which help a lot the development of applications (under the object orientation paradigm – OOP) that persist in relational databases (like MySQL, Postgre, SQL Server, among others).

The function of an ORM framework is to abstract objects from a database (tables, columns, relationships, and so forth), map them, and make them readable within a project being developed in OOP.

Continue lendo

Composer: how to autoload php classes outside the “vendor”

The Composer (https://getcomposer.org/) is a dependency manager (packages) widely used in language PHP and provides many facilities, since it is responsible for checking, download to engage our project all the “libs” of third parties that we will need.

These “libs”, when downloaded by Composer, are grouped within a directory called “vendor”. In addition, a file called “autoload.php” is also created in this folder, responsible for “loading” all the classes we need to use. Basically, all I have to do is import “autoload.php” into a file of my project and I will have access to all classes of “libs” downloaded by Composer.

Continue lendo

[CodeIgniter 4 video lesson] – Models – RELATED CRUD (Insert) – part 2

Hey guys !!! To finalize the new product registration form (“product” table related to “category” table) started in the last video, in this I deal with the submission of the form inside the “controller” and call the “insert” method of the “ProductModel”.

To streamline the process, instead of taking the submitted data and “setting” them in the “model” variable, I pass the submitted data directly via “POST” as a parameter of the “insert” method (through the “method” “this->request->getPost() “).

Continue lendo