Welcome to Nutanix API Getting Started Lab (PHP) - v3
The Nutanix API App Labs will cover a couple of key points.
Creation of a simple application based on the Laravel PHP framework.
Creation of relevant views to display Prism information to the user.
Backend models and controllers to carry out the “real” work i.e. leverage the Nutanix REST APIs.
Scripts to create the interface between the front- and back-end parts of the application.
Because this lab is written to be completed by those with little to no experience with Laravel/PHP or Nutanix APIs, it will step-through each part of the application being created. Experienced developers may wish to go over the API intro in the next section so that it can be integrated into their own applications.
This version of the lab is also an update to v2 published in 2019. Laravel 6 was used in that version, whereas this version will use Laravel 8.
To successfully complete this app lab, you will need an environment that meets the following specifications.
An installation of PHP version 7.4 or later. For this lab, we will use the built-in PHP web server; there’s no requirement to install WAMP, MAMP, IIS etc. To check your PHP version, open a terminal or command prompt and enter the following command:
If you are installing PHP from source or selecting PHP components/libraries, please ensure you enable PHP-dom. This is required for correct Laravel operation.
To check if PHP-dom is installed, the following command can be used. Look for dom in the results.
php -m | head
A Nutanix cluster, running Acropolis 5.18 or later.
An instance of Prism Central version 5.18 or later, with your lab cluster registered against that instance.
If your laptop or workstation is not yet setup for development, you may wish to complete the Nutanix Developer Marketing Dev Environment Setup 1.0 Lab, first.
In addition to the requirement components above, the following things are “nice to have”. They are not mandatory for these labs.
A Github account. This can be created by signing up directly through GitHub.
The GitHub Desktop application (available for Windows and Mac only).
Previous experience with PHP or related scripting/web technologies
Experience with the Laravel PHP framework
Postman, one of the most popular API testing tools available.
This lab can be run in a couple of different ways. Primarily:
In an instructor-led environment, typically completed using Nutanix Frame. These sessions can be arranged with Nutanix directly, if required.
Self-paced, where access to a Nutanix cluster is the responsibility of the reader.