Download the PHP package raoul/mvc-framework without Composer

On this page you can find all versions of the php package raoul/mvc-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mvc-framework

About my mvc Framework

How to install

Clone repository

Install composer packages

Running the framework

To run the framework you have 2 options: Run it from command line

or run it by creating a virtual host.

Note that mvc server uses the PHP server under the hood which is NOT meant to used as a web server so only use mvc serve for development purposes!

And make sure you are running your database if you want to use it

Routing

Go to the web.php file in the routes folder

Route parameters

Grouped routes

Middleware

Middleware is used to validate the uri request

Creating middleware

To create middleware execute the following command:

Adding middleware to a route

Adding middleware to a single route

Adding middleware to grouped routes

To specify new middleware to go app\Http\HttpKernel and add youre middleware class to

Controllers

A controller is used to communicate between a view and a model

Creating a controller

You can create a controller by using the following command:

Routing in a controller

Rendering a view

Models

A model is used to interact with the database

Creating a Model

You can create a model by using the following command:

The name you give to the model wil also be parsed to the name of your database table for example:

will by default have users as table name

You can change the name of databaseTable by adding

Model properties

Below a list of properties that you can change

Model Query Builder

This model also has a query builder wich you can use example below

If you dont want to use the query builder you can also execute sql statements by using:

At the end of every builded query you need to use

to execute the sql statement

Requests

In this framework you can use a request class to validate the request data before it gets to the controller and redirects the user back to the previous page with a errors

Creating a request class

To create a request class use the following command

Specifying the rules

To validate the data you need to use the rules() function as following:

You can also specify what url the request is gona redirect to if it has failed

using authorize()

U can use the authorize function to validate if a user is allowed to make the request if authorize() doesnt return true it will throw en error


All versions of mvc-framework with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
vlucas/phpdotenv Version ^5.5
psr/http-message Version ^1.0
psr/container Version ^2.0
twig/twig Version ^3.5
psr/http-server-middleware Version ^1.0
raoul/php-validator Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package raoul/mvc-framework contains the following files

Loading the files please wait ....