Download the PHP package arjunkomath/crud without Composer

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

PHP CRUD

Latest Stable Version Total Downloads Latest Unstable Version Documentation Status

A simple generic PHP CRUD library


Please note that this project is still in beta, it's not complete. There are more features to come.

Features

Documentation

The documentation is hosted on Read the Docs: phpcrud.rtfd.org

Requirements

Installation

Packagist

This library is available through Packagist with the vendor and package identifier of arjunkomath/crud Please see the Packagist documentation for further information.

Configuration

Configue idiorm, you can read more about it here. You'll have to add the followng lines so that the CRUD class can access the database.

Code

Basic CRUD

Initialize the class

It has three functions as follows:

Read

This function can be used to read data, either the entire table data or you can read a row by its primary key. To read an entire table:

To read a row from a table by its primiary key:

All results are returned as array.

Save

This function can be used to save data to table, you can both create a new row or update an exsising entry. To create an entry: Specify the table name and then pass an array of arguments in such a format that array key represents the field name and value represents the field value. It will return the newly inserted id of the row.

To update an entry identified by its primiary key: You pass an additional paremeter id that is the primary key value to the row to be updated. It will return the id of the row.

Delete

This function can be used to delete an entry from table.

It will return true.

Find

This function can be used to find a row by field name and value.

It will return an array if the row exsists.

CRUD and Views

Initialize the class

It has four functions as follows:

Table

This function can be used to read data and display it in table format. To display an entire table:

It has an optional paramater, that lets you hide any unwanted fields. You can pass an array of field names, and it will automatically skip those fields from the view.

Read

This function can be used to read data from a row and display it in table format.

It has an optional paramater, that lets you hide any unwanted fields. You can pass an array of field names, and it will automatically skip those fields from the view.

Create

This function can be used to input data from the user and save it to database, the CRUD class will automatically generate the views and save the entry to database.

It has an optional paramater, that lets you hide any unwanted fields. You can pass an array of field names, and it will automatically skip those fields from the view. Note that no default values can be passed to these fields as of now, although it will be implemented in future.

Update

This function can be used to update an exsisting entry in the table, the CRUD class will automatically generate the views and update the entry in database.

It has an optional paramater, that lets you hide any unwanted fields. You can pass an array of field names, and it will automatically skip those fields from the view. Note that by default it will show the exsisting data saved in the row.

Thank you.


All versions of crud with dependencies

PHP Build Version
Package Version
Requires j4mie/idiorm Version ^1.5
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 arjunkomath/crud contains the following files

Loading the files please wait ....