1. Go to this page and download the library: Download nguyentn/netsuite-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/ */
namespace App\Http\Controllers;
use NetSuite\Classes\GetRequest;
use NetSuite\Classes\RecordRef;
use NetSuite\Classes\RecordType;
use NetSuite\NetSuiteService;
class LookupController extends Controller
{
public function lookupCustomer(NetSuiteService $service, int $internalId)
{
$request = new GetRequest();
$request->baseRef = new RecordRef();
$request->baseRef->type = RecordType::customer;
$request->baseRef->internalId = $internalId;
$response = $service->get($request);
}
}