├── config └── flare-pulse.php ├── CHANGELOG.md ├── src ├── Livewire │ └── FlarePulseCardComponent.php └── FlarePulseServiceProvider.php ├── resources └── views │ └── flare.blade.php ├── LICENSE.md ├── composer.json └── README.md /config/flare-pulse.php: -------------------------------------------------------------------------------- 1 | name('flare-pulse') 16 | ->hasConfigFile() 17 | ->hasViews(); 18 | } 19 | 20 | public function packageBooted() 21 | { 22 | Livewire::component('flare.pulse', FlarePulseCardComponent::class); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /resources/views/flare.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | use Illuminate\Support\Str; 3 | @endphp 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | @if (true) 17 | 18 | @else 19 |
20 | @foreach ([1,2,3] as $number) 21 |
22 |

23 | Title 24 |

25 | 26 |
27 | Details 28 |
29 |
30 | @endforeach 31 |
32 | @endif 33 |
34 |
35 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Spatie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spatie/flare-pulse", 3 | "description": "Display Flare statistics on your Pulse dashboard", 4 | "keywords": [ 5 | "Spatie", 6 | "laravel", 7 | "flare-pulse" 8 | ], 9 | "homepage": "https://github.com/spatie/flare-pulse", 10 | "license": "MIT", 11 | "authors": [ 12 | { 13 | "name": "Freek Van der Herten", 14 | "email": "freek@spatie.be", 15 | "role": "Developer" 16 | } 17 | ], 18 | "require": { 19 | "php": "^8.1", 20 | "illuminate/contracts": "^10.0", 21 | "laravel/pulse": "^1.0@beta", 22 | "spatie/laravel-package-tools": "^1.14.0" 23 | }, 24 | "require-dev": { 25 | "laravel/pint": "^1.0", 26 | "nunomaduro/collision": "^7.8", 27 | "orchestra/testbench": "^8.8", 28 | "pestphp/pest": "^2.20", 29 | "pestphp/pest-plugin-arch": "^2.0", 30 | "pestphp/pest-plugin-laravel": "^2.0", 31 | "spatie/laravel-ray": "^1.26" 32 | }, 33 | "autoload": { 34 | "psr-4": { 35 | "Spatie\\FlarePulse\\": "src/", 36 | "Spatie\\FlarePulse\\Database\\Factories\\": "database/factories/" 37 | } 38 | }, 39 | "autoload-dev": { 40 | "psr-4": { 41 | "Spatie\\FlarePulse\\Tests\\": "tests/", 42 | "Workbench\\App\\": "workbench/app/" 43 | } 44 | }, 45 | "scripts": { 46 | "post-autoload-dump": "@composer run prepare", 47 | "clear": "@php vendor/bin/testbench package:purge-flare-pulse --ansi", 48 | "prepare": "@php vendor/bin/testbench package:discover --ansi", 49 | "build": [ 50 | "@composer run prepare", 51 | "@php vendor/bin/testbench workbench:build --ansi" 52 | ], 53 | "start": [ 54 | "Composer\\Config::disableProcessTimeout", 55 | "@composer run build", 56 | "@php vendor/bin/testbench serve" 57 | ], 58 | "analyse": "vendor/bin/phpstan analyse", 59 | "test": "vendor/bin/pest", 60 | "test-coverage": "vendor/bin/pest --coverage", 61 | "format": "vendor/bin/pint" 62 | }, 63 | "config": { 64 | "sort-packages": true, 65 | "allow-plugins": { 66 | "pestphp/pest-plugin": true, 67 | "phpstan/extension-installer": true 68 | } 69 | }, 70 | "extra": { 71 | "laravel": { 72 | "providers": [ 73 | "Spatie\\FlarePulse\\FlarePulseServiceProvider" 74 | ], 75 | "aliases": { 76 | "FlarePulse": "Spatie\\FlarePulse\\Facades\\FlarePulse" 77 | } 78 | } 79 | }, 80 | "minimum-stability": "dev", 81 | "prefer-stable": true 82 | } 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Display Flare statistics on your Pulse dashboard 2 | 3 | [![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/flare-pulse.svg?style=flat-square)](https://packagist.org/packages/spatie/flare-pulse) 4 | [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/spatie/flare-pulse/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/spatie/flare-pulse/actions?query=workflow%3Arun-tests+branch%3Amain) 5 | [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/spatie/flare-pulse/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/spatie/flare-pulse/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) 6 | [![Total Downloads](https://img.shields.io/packagist/dt/spatie/flare-pulse.svg?style=flat-square)](https://packagist.org/packages/spatie/flare-pulse) 7 | 8 | This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. 9 | 10 | ## Support us 11 | 12 | [](https://spatie.be/github-ad-click/flare-pulse) 13 | 14 | We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us). 15 | 16 | We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards). 17 | 18 | ## Installation 19 | 20 | You can install the package via composer: 21 | 22 | ```bash 23 | composer require spatie/flare-pulse 24 | ``` 25 | 26 | You can publish and run the migrations with: 27 | 28 | ```bash 29 | php artisan vendor:publish --tag="flare-pulse-migrations" 30 | php artisan migrate 31 | ``` 32 | 33 | You can publish the config file with: 34 | 35 | ```bash 36 | php artisan vendor:publish --tag="flare-pulse-config" 37 | ``` 38 | 39 | This is the contents of the published config file: 40 | 41 | ```php 42 | return [ 43 | ]; 44 | ``` 45 | 46 | Optionally, you can publish the views using 47 | 48 | ```bash 49 | php artisan vendor:publish --tag="flare-pulse-views" 50 | ``` 51 | 52 | ## Usage 53 | 54 | ```php 55 | $flarePulse = new Spatie\FlarePulse(); 56 | echo $flarePulse->echoPhrase('Hello, Spatie!'); 57 | ``` 58 | 59 | ## Testing 60 | 61 | ```bash 62 | composer test 63 | ``` 64 | 65 | ## Changelog 66 | 67 | Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. 68 | 69 | ## Contributing 70 | 71 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details. 72 | 73 | ## Security Vulnerabilities 74 | 75 | Please review [our security policy](../../security/policy) on how to report security vulnerabilities. 76 | 77 | ## Credits 78 | 79 | - [Freek Van der Herten](https://github.com/freekmurze) 80 | - [All Contributors](../../contributors) 81 | 82 | ## License 83 | 84 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 85 | --------------------------------------------------------------------------------