Author: admin

  • Debug

    Overview PHP offers tools to debug applications with notices, warnings, errors and exceptions. The Exception class offers information such as the file, line, message, numeric code, backtrace etc. of where an error occurred. OOP frameworks like Phalcon mainly use this class to encapsulate this functionality and provide information back to the developer or user. Despite being written…

  • Phalcon Devtools

    Overview These tools help you to generate skeleton code, maintain your database structure and helps to speedup development. Core components of your application can be generated with a simple command, allowing you to easily develop applications using Phalcon. Phalcon Devtool can be controlled using the cmd line or the web interface. Installation Phalcon Devtools can…

  • Nanobox 

    Overview Nanobox is a portable, micro platform for developing and deploying apps. When working locally, Nanobox uses Docker to spin up and configure a virtual development environment configured to your specific needs. When you’re ready to deploy to live servers, Nanobox will take that same environment and spin it up on your cloud provider of choice,…

  • Environments

    Overview The Devilbox The Devilbox is a modern and highly customizable dockerized PHP stack supporting full LAMP and MEAN and running on all major platforms. The main goal is to easily switch and combine any version required for local development. It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created…

  • Webserver Setup

    Overview In order for the routing for a Phalcon application to work, you will need to set up your web server in a way that it will process redirects properly. Below are instructions for popular web servers: PHP Built-in The PHP built-in web server is not recommended for production applications. You can use it though…

  • Tutorial 

    Overview Throughout this tutorial, we will create an application with a simple registration form, while introducing the main design aspects of Phalcon. This tutorial covers the implementation of a simple MVC application, showing how fast and easy it can be done with Phalcon. Once developed, you can use this application and extend it to suit…

  • JSON Compatible Encoder

    There are some cases where you might need to convert a data type (like a Pydantic model) to something compatible with JSON (like a dict, list, etc). For example, if you need to store it in a database. For that, FastAPI provides a jsonable_encoder() function. Using the jsonable_encoder Let’s imagine that you have a database fake_db that only receives JSON compatible data. For example,…

  • Path Operation Configuration

    Response Status Code You can define the (HTTP) status_code to be used in the response of your path operation. You can pass directly the int code, like 404. That status code will be used in the response and will be added to the OpenAPI schema. Technical Details You could also use from starlette import status. FastAPI provides the same starlette.status as fastapi.status just as a convenience for…

  • Handling Errors

    There are many situations in which you need to notify an error to a client that is using your API. This client could be a browser with a frontend, a code from someone else, an IoT device, etc. You could need to tell the client that: In these cases, you would normally return an HTTP status…

  • Request Forms and Files

    Import File and Form Define File and Form parameters The files and form fields will be uploaded as form data and you will receive the files and form fields.