it-brains / laravel-aurora-solar
Package for 3rd party API integration with Aurora Solar provider
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Requires
- php: >=8.1
- illuminate/http: ^8.0|^9.0|^10.0|^11.0|^12.0
- illuminate/support: ^8.38|^9.0|^10.0|^11.0|^12.0
Requires (Dev)
- illuminate/testing: ^8.0|^9.0|^10.0|^11.0|^12.0
- orchestra/testbench: ^10.0
- phpunit/phpunit: ^8.0|^9.0|^10.0|^11.0
README
A Laravel wrapper for the Aurora Solar API.
This package simplifies integration with Aurora Solar's API, enabling full-featured interaction including managing solar projects, design requests, and more.
API Documentation
Installation
Install the package via Composer:
composer require it-brains/laravel-aurora-solar:^1.0
Set the required environment variables in your .env
file:
AURORA_TENANT_ID= AURORA_BEARER=
To confirm that everything is working correctly, try retrieving tenant details:
Aurora::getTenantDetails();
Usage Example
Create a project and a design request with auto-accept and SLA settings:
use Aurora\Facades\Aurora; use Aurora\Models\Project; use Aurora\Enums\ProjectTypeEnum; $auroraProject = Aurora::createProject( Project::init() ->setName('The best project ever') ->setCustomerName('John', 'Doe') ->setLocation( '4123 Aquastone Court, Bakersfield, CA, USA, 93313', 35.2673641, -119.0491066 ) ->setProjectType(ProjectTypeEnum::RESIDENTIAL) ->setExternalProviderId('Our internal unique project ID') ); $designRequest = Aurora::createDesignRequest([ 'project_id' => $auroraProject['id'], 'auto_accept' => true, 'sla' => 30, ]); $designRequestId = $designRequest['id'];
Local Development with Dummy Client
For local development and testing, you can use the built-in Dummy driver, which generates predefined DXF, assets, and other mock data.
Set the driver in your .env
:
AURORA_DRIVER=dummy
There are four predefined fixtures used in random order. To force the use of a specific fixture:
AURORA_FIXTURE=2