1. Go to this page and download the library: Download vmunich/ark-laravel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vmunich / ark-laravel example snippets
// You can alias this in config/app.php.
use BrianFaust\Lark\Facades\Lark;
Lark::api('Account')->accounts();
// We're done here - how easy was that, it just works!
use BrianFaust\Lark\Facades\Lark;
// Writing this…
Lark::connection('main')->api('Account')->accounts()->create($params);
// …is identical to writing this
Lark::api('Account')->accounts()->create($params);
// and is also identical to writing this.
Lark::connection()->api('Account')->accounts()->create($params);
// This is because the main connection is configured to be the default.
Lark::getDefaultConnection(); // This will return main.
// We can change the default connection.
Lark::setDefaultConnection('alternative'); // The default is now alternative.
use BrianFaust\Lark\LarkManager;
class Foo
{
protected $lark;
public function __construct(LarkManager $lark)
{
$this->lark = $lark;
}
public function bar($params)
{
$this->lark->api('Account')->accounts();
}
}
App::make('Foo')->bar($params);