Posts

Zend PHP 7 Certification – PHP Basics – Syntax

This post covers the Syntax section of the PHP Basics chapter when studying for the Zend PHP 7 Certification.
When the PHP parser parses a file, it looks for opening and closing tags, which are <?php and ?> respectively.
PHP then will interpret code between them, which allows you to embed code in different documents, ...

Uninstall Modules in Magento 2

To uninstall modules in Magento 2, you can either use a Composer command if the module has been installed via Composer, or remove the module manually if it was installed that way.
If you install a module via Composer, you can use Magento’s module:uninstall command which can be run from the root directory of ...

HTML Forms in Laravel

To add HTML forms in Laravel, you must install the HTML component. This component is part of a list of components that have been removed from the Laravel core framework. Even though this features have been removed from the main application, they are still maintained meaning that the components can be installed without worrying about ...

Modules in Laravel

In order to write modular applications, a laravel-modules package has been created by nWidart which provides the ability to write modules in Laravel 5, a feature not provided by the framework out of the box.
The package is installed via Composer, a few adjustments are made to the Laravel application and then you’re ready to ...

Create a New Page in Laravel

After installing and configuring Laravel, one of the first steps in order to understand how the framework works is to create a custom static page with its own route and render a view file with some content. To create a new page in Laravel, first look over parts of the directory structure.
As mentioned in ...

The Magento 2 Root Template

The Magento 2 root template is used as a base template for all of Magento’s store pages. This is a very basic template, and in HTML terms it contains the HTML5 doctype declaration, <head> and <body> tags.
The root template resolves HTML duplication within Magento 1 applications, as out of the few templates that were ...

Getting Started with Grunt

Grunt is a JavaScript task runner used to automate tasks such as minifying assets, compilation and other repetitive tasks. Getting started with Grunt is easy: simply install the CLI, create a package.json and a Gruntfile file, and run the Grunt command.
To install the CLI on your machine and allow the use of running the ...

Add a Magento 2 Service Contract

Magento modules use service contracts, which are a set of PHP interfaces including data interfaces, which preserve data integrity, and service interfaces, which hide business logic details from service requestors such as controllers, web services, and other modules. To add a Magento 2 service contract, first you must create and register a Magento module. This ...

Magento 2 LESS Compilation

Magento makes use of CSS preprocessing using LESS. There are two modes of Magento 2 LESS Compilation: client side and server side. Both modes involve compiling .less files into .css files.
To learn more about writing LESS, view the Getting Started with LESS post.
Magento’s blank theme includes three main stylesheets that are included via ...

Useful Nginx Configuration

The way the Nginx web server works is determined by its configuration files. If running a PHP application, some useful Nginx configuration code snippets can be seen below.
To route all requests through through an index.php file.
location / {
try_files $uri $uri/ /index.php?$args;
}
If running a live application, you ...