Download the PHP package jbtje/vtiger-laravel without Composer
On this page you can find all versions of the php package jbtje/vtiger-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package vtiger-laravel
Vtiger 7.4.0 open source (Laravel 8 Package)
This package might work with older versions of Vtiger, and possibly with laravel 6 or 7.
BerliCRM (based on Vtiger) has a better documentation, files are added in the documentation folder.
Use the Vtiger webservice (REST) API from within Laravel for the following operations.
- ListTypes
- Create
- Retrieve
- Update
- Delete
- Search
- Query
- Describe
See Third Party App Integration (REST APIs)
Installation, Configuration and Usage
Installing
-
In order to install the Vtiger package in your Laravel project, just run the composer require command from your terminal:
- Add ENV variables:
Username and Access Key can be found within Vtiger under My Preferences
- Optional: Publish the configuration file:
Configuration
You can create a new user in Vtiger for the API to use, or use an existing user.
Usage
Include the Vtiger package in your controller:
ListTypes
List types is a command to provide you with all possible types the Vtiger CRM supports. For each type, you can run
the describe()
command, to obtain the data structure.
Obtain all the list types:
For a clean install, this will return: (click to expand)
Describe
To obtain the data sctructure of a module in Vtiger, run the describe method with the module name. Module names can be
obtained using listTypes()
Partial result for "Contacts": (click to expand)
_Please note the `mandatory` field._Create
To insert a record into the CRM, first create an array of data to insert. Using describe()
, you can see which fields
are mandatory.
Retrieve
To retrieve a record from the CRM, you need the id of the record you want to find (i.e. '4x1').
Update
The easiest way to update a record in the CRM is to retrieve the record first.
Then update the object:
Delete
To delete a record from the CRM, you need the id of the record you want to delete (e.g. '4x1').
Lookup
This function uses the Vtiger Lookup API endpoint to search for a single piece of information within multiple columns of a Vtiger module. This function is often multitudes faster than the search function.
Search
This function is a sql query builder wrapped around the query function. Accepts instance of laravels QueryBuilder.
By default, the function will quote but not escape your inputs, if you wish for your data to not be quoted, set the 2nd paramater to false:
Also keep in mind that Vtiger has several limitations on it's sql query capabilities. You can not use conditional grouping i.e "where (firstname = 'John' AND 'lastname = 'Doe') OR (firstname = 'Jane' AND lastname = 'Smith')" will fail.
Query
To use the Query Operation , you first need to create the SQL query.
Then run the query...
Contributing
Please report any issue you find in the issues page. Pull requests are more than welcome.
License
This project is licensed under the MIT licence - see the LICENSE.md file for details
Contributors
This package is based upon Clystnet/Vtiger
This project follows the all-contributors specification. Contributions of any kind welcome!