PHP code example of jeanfprado / laravel-report
1. Go to this page and download the library: Download jeanfprado/laravel-report 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/ */
jeanfprado / laravel-report example snippets
namespace App\Reports;
use App\Models\User;
use Jeanfprado\LaravelReport\Report;
class UserReport extends Report
{
protected $view = 'reports.user-report';
public function toArray()
{
return [
'users ' => User::all();
];
}
}
php artisan make:report UsersReport --view=reports.users-report