There is a full list of frameworks most of which are php frameworks, these frameworks help in Rapid Application
Development. However, some of these frameworks are really had to get started with, have complex paradigms,
and some are not good enough for an advanced php developer. This is where the yuga-framework comes in handy.
In this tutorial, I will introduce you to yuga-framework a framework for PHP that leverages between a beginner and advanced developer. Yuga-framework can be used just to develop apis or fully fledged web applications.
Yuga is a php framework that is ideal for rapid web app development, It can be used to develop apis or an entire web application like mentioned earlier. It supports all HTTP verbs or methods (GET, POST, PUT, DELETE, PATCH, and custom ones). It has automatic form validation, automatic cross site request forgery protection on routes and does not force the user to use Route methods if they aren't coming from that background. You can learn and advance with the framework.
Install composer (php package manager) if you don't already have it on your machine from here
To get started you just need one command
composer create-project yuga/yuga Blog -s dev
To run the application we have just created using composer, we cd to Blog and open the project in terminal or console, type the following yuga command, Oooh, Did I forget to mention that the framework comes with its own console application, I just did.
php yuga start
To see what the yuga start command has done, go to your browser and visit http://localhost:8000
Open the project in your favorite editor, in my case it's vs code. Let's try to see the file structure
- helpers (optional)
- Middleware (created automatically when you make a middleware using a yuga command).
- Providers (houses your application service providers)
- ViewModels (Where view models live). The framework is well integrated with ViewModels so that's where our logic will reside
- boot (framework specific) do not touch
- config (Where the configuration settings of you application reside). Feel free to alter and see how the application changes
- database (Where migrations live)
- environment (Where environment settings live)
- mailables (Where files that can be sent as emails reside). This can change
- public (Where you should point your server instance)
- resouces (Where views are saved)
- web.php (A file that holds all our routes)