Download the PHP package esign/laradoo without Composer
On this page you can find all versions of the php package esign/laradoo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download esign/laradoo
More information about esign/laradoo
Files in esign/laradoo
Informations about the package laradoo
Laradoo
Odoo ERP API for Laravel. Odoo website
Compatibility
Laravel version | PHP version | Package version |
---|---|---|
^8.0 | ^7.4 | ^V3.0 |
^5.1 | ^5.6 | ^V2.0 |
^5.1 | ^5.5 | ^V1.1 |
Installation
type in console:
Register Laradoo service by adding it to the providers array.
Let's add the Alias facade, add it to the aliases array.
Publish the package's configuration file to the application's own config directory
Configuration
After publishing the package config file, the base configuration for laradoo package is located in config/laradoo.php
Also, you can dynamically update those values calling the available setter methods:
host($url)
, username($username)
, password($password)
, db($name)
, apiSuffix($name)
Usage samples
Instance the main Odoo class:
You can get the Odoo API version just calling the version method:
This methods doesn't require to be connected/Logged into the ERP.
Connect and log into the ERP:
All needed configuration data is taken from laradoo.php
config file. But you always may pass new values on the fly if required.
// Note:
host
should contain 'http://' or 'https://'
After login, you can check the user identifier like follows:
You always can check the permission on a specific model:
Permissions which can be checked: 'read','write','create','unlink'
Method `search provides a collection of ids based on your conditions:
You can limit the amount of data using limit
method and use as many as condition you need:
If need to get a list of models, use the get
method:
Instead of retrieving all properties of the models, you can reduce it by adding fields
method before the method get
If not sure about what fields a model has, you can retrieve the model structure data by calling fieldsOf
method:
Till now we have only retrieved data from the ERP but you can also Create and Delete records.
In order to create a new record just call create
method as follows:
The method returns the id of the new record.
For Deleting records we have the delete
method:
Notice that before calling
delete
method you have to usewhere
.
You can also remove records by ids like follows:
Update any record of your ERP:
Notice that all delete
and update
methods always returns true
except if there was an error.
call
method is also available for those who want to set a custom API call: