PHP code example of claassenmarius / laravel-skynet
1. Go to this page and download the library: Download claassenmarius/laravel-skynet 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/ */
claassenmarius / laravel-skynet example snippets
use Claassenmarius\LaravelSkynet\Skynet;
class QuoteController extends Controller
{
public function __invoke(Skynet $skynet)
{
$response = $skynet->quote(...);
// do somethin with the $response
}
}
use Claassenmarius\LaravelSkynet\Facades\Skynet;
class QuoteController extends Controller
{
public function __invoke()
{
$response = Skynet::quote(...);
// do somethin with the $response
}
}
use Claassenmarius\LaravelSkynet\Skynet;
class QuoteController extends Controller
{
public function __invoke()
{
$skynet = app()->make(Skynet::class);
$response = $skynet->quote(...);
// do somethin with the $response
}
}
use Claassenmarius\LaravelSkynet\Skynet;
class QuoteController extends Controller
{
public function __invoke()
{
$skynet = new Skynet(
'skynet_username',
'skynet_password',
'skynet_system_id',
'skynet_account_number'
);
$response = $skynet->quote(...);
// do somethin with the $response
}
}