Download the PHP package vgalvoso/spm without Composer

On this page you can find all versions of the php package vgalvoso/spm. 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 spm

Welcome to (SPM) Simple PHP MVC, just what you need!

This is a simple PHP MVC framework without too much dependencies that you don't need.

Supports:

  1. PHP 7^
  2. MYSQL
  3. MSSQL
  4. SQLite

Getting Started

  1. Download the latest release or install via composer [composer create-project vgalvoso/spm].
  2. Configure your database in app/Config/Database.php.
  3. Make sure the project is located inside your web server's root directory.
  4. Now you can create Controllers,Views and Models.

Routing

Creating routes is easy in SPM.

Open routes.php.

Add your new route.

To get data from POST request, use post() function

To get data from GET request, use get() function

To call cli use cli() function

Controllers

Controllers responds to hyperlinks,form actions and url inputs.

Lets create the function for the "post" route in Home controller.

And for our "get" route.

Views

Views shows information to the user.

Let's use our view for Home controller(home route)

You can pass data to view. (Must be an associative array)

Keys from the array will be converted into variables that you can use in the views

Models

Models are used for CRUD(Create,Update,Delete) operations and SPM made that easy.

Initialize our model

When we don't place parameter, our model will use the default database.

Use other database that is configured in app/Config/Database.php

We can also use other database even it is not declared in Database.php

Select single item

Select multiple items

Anti SQL Injection

To Insert data create an assoc array and use table field names as array keys

To Delete data use exec() function

To Update data use exec() function

Start Transaction

Commit

Rollback

Everytime we use our Model functions and it fails, we can get the error

We can also see what is the database driver we are currently using.

And we can also get the last inserted id


All versions of spm with dependencies

PHP Build Version
Package Version
No informations.
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 vgalvoso/spm contains the following files

Loading the files please wait ...