PHP code example of larawire-garage / larapex-livewire
1. Go to this page and download the library: Download larawire-garage/larapex-livewire 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/ */
larawire-garage / larapex-livewire example snippets
// change theme from chart component
$this->chart = (new WireableAreaChart($this->chart_id))
->addArea('sample-1', $this->dataSource())
->theme('auto'); // support: light, dark, auto
// layouts.app.blade.php
<body>
<!-- Your layout HTML content -->
@yield('scripts')
@stack('lw_scripts')
</body>
php artisan make:larapex YOUR_CHART_CLASS_NAME
private function dataSource(){
// Data generating logic
}
public function build()
{
$this->chart = (new WireableAreaChart($this->chart_id))
->addArea('sample-1', $this->dataSource());
}