Zoho Laravel Package
, (*1)
phpunit --test-suffix ContactTest.php
phpunit --filter it_fetch_the_invoices_for_a_given_contact, (*2)
istallation
composer require organit/zoho, (*3)
app/config
App\Providers\RouteServiceProvider::class,, (*4)
usage
Zoho::organization()->get(), (*5)
--, (*6)
$PICAFLOR = Zoho::organization()->init('84525121'); //organization_id
$contacts = $PICAFLOR->contacts()->index()['data'];, (*7)
Contributing
Organit, (*8)
Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed., (*9)
License
The Laravel framework is open-sourced software licensed under the MIT license., (*10)
1 - Creer repertoire ; /Packages/Organit/zoho
2 - terminal : cd Packages/Organit/zoho
3 - terminal composer init
4 - copier le dossier src depuis l'exemple (ici)
5 - custumize
6 - Modifier composer.json (main)
...
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/",
"Organit\Zoho\"::"Packages/Organit/Zoho"
}
},
...
7 - composer dump-autoload from main directory
8 - Ajouter le serviceprovider dans config/app : Organit\Zoho\ZohoServiceProvider::class,
+facade 'Zoho' => Organit\Zoho\ZohoFacade::class,
9 - cd Packages/Organit/Zoho > git init, (*11)
10 - recuperer l'url de github pour la coller dans packagist
11 - creer le repo sur packagist
+ add webhook, (*12)
crrer version Tag
git tag -a 1.0.0 -m "first version"
git push --tags, (*13)
tests - phpunit
12 - add this to phpunit.xml, (*14)
...
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
<testsuite name="Package Test Suite">
<directory suffix="Test.php">./Packages/Organit/Zoho/tests</directory>
</testsuite>
</testsuites>
...
//////////
POur ajouter des Snippets de class (ex==>create invoice)
1 - /tests/TestCase.php, (*15)
public function zoho()
{
return new ZohoSnippets;
}
2 - creer une classe Snippets dans packages/Test nommmee Snippets, (*16)
3 - //utiliser :
Parent::zoho()->createContact(), (*17)