DEV Community

Cover image for Dynamic Report Generation in Laravel: Introducing `laravel-dynamic-report-generator`
Md Sazzadul islam
Md Sazzadul islam

Posted on

Dynamic Report Generation in Laravel: Introducing `laravel-dynamic-report-generator`

Are you looking for a way to dynamically generate reports in your Laravel application? Look no further! Today, I’m excited to introduce laravel-dynamic-report-generator, a package that allows you to create dynamic reports with drag-and-drop functionality for selecting table columns and joining multiple tables. Let's dive in and see how you can easily integrate this into your Laravel project.

Saved Reports

Display query results

Features

  • Drag and drop table columns
  • Join multiple tables
  • Generate dynamic SQL queries
  • View and paginate query results

Installation

To get started with laravel-dynamic-report-generator, follow these steps:

  1. Install the package via Composer:

    composer require devforest/laravel-dynamic-report-generator
    
  2. Publish the configuration file and assets:

    php artisan vendor:publish --provider="DevForest\ReportGeneratorServiceProvider"
    
  3. Run the migrations:

    php artisan migrate
    
  4. Add the service provider to config/app.php (if not using package discovery):

    'providers' => [
        // Other service providers...
        DevForest\\ReportGeneratorServiceProvider::class,
    ],
    

Usage

Now that you have the package installed, let's walk through how to use it to generate reports.

  1. Navigate to the Report Generator:
    Open your browser and go to /report-generator in your Laravel application.

  2. Select Tables and Columns:

    • Drag and drop tables from the list to the workspace.
    • Drag and drop columns from the selected tables to include them in the report.
  3. Generate the Query:
    Once you've selected the necessary columns and joins, generate the query. Review and edit the query if needed before executing it.

  4. Execute the Query:
    Click the "Execute" button to run the query and view the results. The results will be displayed in a paginated table.

Conclusion

With laravel-dynamic-report-generator, creating dynamic reports in Laravel has never been easier. Whether you need to generate reports for data analysis, exporting, or just viewing complex data sets, this package has you covered. Install it today and take your Laravel application to the next level!

For more details, check out the GitHub repository and the documentation.


Feel free to modify the content according to your needs and include any additional information or features that might be relevant to your users. Happy coding!

Top comments (0)