PHP code example of astroway / sdk-laravel
1. Go to this page and download the library: Download astroway/sdk-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/ */
astroway / sdk-laravel example snippets
use Astroway\Astroway;
class ChartController extends Controller
{
public function __construct(private readonly Astroway $astroway) {}
public function store(Request $request)
{
return response()->json(
$this->astroway->chart()->compute($request->all()),
);
}
}
use Astroway\Laravel\Facades\Astroway;
return Astroway::chart()->compute(['date' => '1990-01-15', ...]);
$aw = app('astroway');
$chart = $aw->chart()->compute([...]);