mortezamasumi/fb-report
A Laravel package for working with Facebook reports, providing a simple way to query, format, and export report data. Integrate Facebook reporting into your PHP applications with configurable metrics, a lightweight API, and reusable report generation without boilerplate.
Start by installing the package and publishing its config, views, and assets using the publish tags documented in the README:
composer require mortezamasumi/fb-report
php artisan vendor:publish
Then inspect, in this order:
config/fb-report.php — global defaults, report registration, and loading-screen behavior.resources/views/vendor/fb-report — especially the loading-screen partial.The first practical use case is to render one existing report and confirm the new v5.4.0 default: a loading screen is now shown for all reports. Use that as your baseline, then decide whether to keep the global default or override it per report.
For a new report, wire up the smallest possible report definition, hit its route, and verify the loading state appears before the report content. Once that works, customize the loading view or opt specific reports out if the loader is unnecessary.
Treat the loading screen as a global default with per-report overrides. Since v5.4.0 enables loading screens for all reports by default, the cleanest pattern is to leave the global setting on and override only fast or embedded reports where the loader adds noise.
Customize the loading view once, reuse everywhere. Publish the package views and replace the loading partial with your application’s skeleton/spinner component. This keeps every report visually consistent without touching individual report definitions.
Use the loading screen for data-heavy reports. Reports that call external APIs, aggregate large datasets, or render charts benefit most. Pair the loading state with cached report data so repeat views are fast and the loader does not flash unnecessarily.
Disable or shorten the loader for inline dashboard widgets. If reports are embedded in a dashboard alongside other content, a full loading screen can be disruptive. Prefer a per-report opt-out or a compact inline loading state if the package exposes one.
Keep report routes behind your normal middleware. Apply auth, authorization, and tenant scoping at the route/controller layer rather than inside report definitions. This keeps report classes focused on data and presentation.
Test the loading and loaded states separately. Assert that the loading markup is present in the initial response, then assert the final report output. If the loading screen is configurable, add tests for both enabled and disabled configurations.
Use config and view overrides as the primary extension points. Avoid editing vendor files. Publish config/views, override the loading partial, and use per-report settings where available.
php artisan config:clear and php artisan view:clear when changing loading-screen settings, especially in environments where config is cached.How can I help you explore Laravel packages today?