PHPackages                             rishadblack/wire-reports - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. rishadblack/wire-reports

ActiveLibrary[Templating &amp; Views](/categories/templating)

rishadblack/wire-reports
========================

Create responsive, real-time report views in Laravel using WireReports. Powered by Livewire, this package allows effortless exporting to PDF, Excel, or print, streamlining your reporting process.

1.0.8(1y ago)136AGPL-3.0PHPPHP ^8.1

Since Sep 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rishadblack/wire-reports)[ Packagist](https://packagist.org/packages/rishadblack/wire-reports)[ Docs](https://github.com/rishadblack/wire-reports)[ RSS](/packages/rishadblack-wire-reports/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (8)Used By (0)

WireReports
===========

[](#wirereports)

**WireReports** is a Laravel package designed to facilitate the creation of dynamic Livewire report components. It includes features for exporting reports to PDF and Excel formats and offers an easy way to generate and manage report components with custom views and data builders.

Features
--------

[](#features)

- Create Livewire report components with a single command
- Export reports to PDF using SnappyPdf or mPDF
- Export reports to Excel using Maatwebsite\\Excel
- Customizable views for reports
- Supports hierarchical folder structure for components and views

Installation
------------

[](#installation)

To install the package, you can use Composer:

```
composer require rishadblack/wire-reports
```

Publishing Stubs
----------------

[](#publishing-stubs)

To publish the package stubs for customization, run:

```
php artisan vendor:publish --provider="Rishadblack\WireReports\WireReportsServiceProvider" --tag="wire-reports-stubs"
```

Usage
-----

[](#usage)

### Creating a Report Component

[](#creating-a-report-component)

You can create a new Livewire report component using the Artisan command:

```
php artisan make:wire-reports {name}
```

The {name} argument should be the name of the component. You can include subfolders by using dot notation (e.g., Demo.Test). Example

To create a report component named TestReport in the Demo folder:

```
php artisan make:wire-reports Demo.Test
```

This will create:

```
A Livewire component file at app/Livewire/Reports/Demo/TestReport.php
A Blade view file at resources/views/livewire/reports/demo/test-report.blade.php

```

### Deleting a Report Component

[](#deleting-a-report-component)

You can delete an existing Livewire report component using the Artisan command:

```
php artisan delete:wire-reports {name}
```

The {name} argument should be the name of the component to delete. It will remove both the component class and the associated view file. Example

To delete the TestReport component from the Demo folder:

```
php artisan delete:wire-reports Demo.Test
```

This will remove:

```
The Livewire component file at app/Livewire/Reports/Demo/TestReport.php
The Blade view file at resources/views/livewire/reports/demo/test-report.blade.php

```

### Customizing the Report Component

[](#customizing-the-report-component)

Edit the generated component file to define your report's data builder and view:

```
