composer: update packages description and keywords

This commit is contained in:
Younes ENNAJI
2024-04-11 17:25:32 +00:00
parent c7367e7c12
commit 14646df9e5
15 changed files with 97 additions and 671 deletions
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "library",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "Elevate user engagement in Laravel and Symfony projects with PHPFlasher, a comprehensive flash messaging toolkit. This library facilitates streamlined user feedback management and supports a variety of popular notification styles including Noty, Notyf, SweetAlert, and Toastr. PHPFlasher is designed for ease of use, making it accessible to both beginners and experienced developers seeking to enhance the interactive elements of their web applications.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "The core repository for PHPFlasher, hosting the source code, contributions, issue tracking, and discussions for the PHPFlasher project. This mono-repo serves as the hub for development and community engagement.",
"keywords": ["php", "flash-messages", "notifications", "phpflasher", "user-feedback", "open-source", "contributions", "discussions", "issue-tracking"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+31 -64
View File
@@ -1,6 +1,6 @@
---
permalink: /
description: PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.
description: PHPFlasher is a robust, open-source tool for seamlessly adding flash messages to Laravel or Symfony projects, aimed at improving user interaction and feedback with minimal developer effort.
data-controller: flasher
---
@@ -8,102 +8,69 @@ data-controller: flasher
<img id="logo" src="{{ '/static/images/php-flasher-logo.svg'|absolute_url }}" class="h-20 my-8" alt="PHPFlasher">
<p class="pt-4 mt-4 text-center">
<a href="https://www.linkedin.com/in/younes--ennaji/">
<img src="https://img.shields.io/badge/author-@yoeunes-blue.svg" alt="Author" />
<img src="https://img.shields.io/badge/author-@yoeunes-blue.svg" alt="Author Badge" />
</a>
<a href="https://github.com/php-flasher/php-flasher">
<img src="https://img.shields.io/badge/source-php--flasher/php--flasher-blue.svg" alt="Source" />
<img src="https://img.shields.io/badge/source-php--flasher/php--flasher-blue.svg" alt="Source Code Badge" />
</a>
<a href="https://github.com/php-flasher/php-flasher/releases">
<img src="https://img.shields.io/github/tag/php-flasher/flasher.svg" alt="GitHub release" />
<img src="https://img.shields.io/github/tag/php-flasher/flasher.svg" alt="GitHub Release Badge" />
</a>
<a href="https://github.com/php-flasher/flasher/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt="License" />
<img src="https://img.shields.io/badge/license-MIT-brightgreen.svg" alt="License Badge" />
</a>
<a href="https://packagist.org/packages/php-flasher/flasher">
<img src="https://img.shields.io/packagist/dt/php-flasher/flasher.svg" alt="Packagist Downloads" />
<img src="https://img.shields.io/packagist/dt/php-flasher/flasher.svg" alt="Packagist Downloads Badge" />
</a>
<a href="https://github.com/php-flasher/php-flasher">
<img src="https://img.shields.io/github/stars/php-flasher/php-flasher.svg" alt="GitHub stars" />
<img src="https://img.shields.io/github/stars/php-flasher/php-flasher.svg" alt="GitHub Stars Badge" />
</a>
<a href="https://packagist.org/packages/php-flasher/flasher">
<img src="https://img.shields.io/packagist/php-v/php-flasher/flasher.svg" alt="PHP Version" />
<img src="https://img.shields.io/packagist/php-v/php-flasher/flasher.svg" alt="Supported PHP Version Badge" />
</a>
</p>
</div>
## <i class="fa-duotone fa-list-radio"></i> Introduction
{% PHPFlasher %} is a powerful and easy-to-use package that allows you to quickly and easily add flash messages to your Laravel or Symfony projects.
Whether you need to alert users of a successful form submission, an error, or any other important information, flash messages are a simple and effective solution for providing feedback to your users.
{% PHPFlasher %} is a powerful, community-driven, open-source project designed to enhance your web applications by providing an intuitive way to display flash messages. These messages serve as immediate feedback for user actions, significantly improving user experience by confirming actions like form submissions, warnings, or errors.
With {% PHPFlasher %}, you can easily record and store messages within the session, making it simple to retrieve and display them on the current or next page.
This improves user engagement and enhances the overall user experience on your website or application.
Whether you're a beginner or an experienced developer, {% PHPFlasher %}'s intuitive and straightforward design makes it easy to integrate into your projects.
So, if you're looking for a reliable, flexible and easy to use flash messages solution, {% PHPFlasher %} is the perfect choice.
Flash messages are crucial for interactive applications, and {% PHPFlasher %} makes implementing them in {% Laravel %} or {% Symfony %} projects straightforward. With support for session-based message storage, {% PHPFlasher %} ensures that messages can be easily set and then retrieved for display on subsequent pages, without complex setup.
---
### <i class="fa-duotone fa-list-radio"></i> Flash notification types
### <i class="fa-duotone fa-list-radio"></i> Flash Notification Types
Flash notifications serves as a feedback & confirmation mechanism after the user takes an action.
{% PHPFlasher %} can handle a variety of notification types to suit different feedback scenarios:
> <div class="mt-2"><span class="text-green-700"><i class="fa-solid fa-circle-check fa-xl"></i> success : </span> Whatever was attempted did, in fact, succeed.</div>
> <div class="mt-2"><span class="text-blue-600"><i class="fa-solid fa-circle-info fa-xl"></i> info : </span> Some event occurred that the user should be aware of.</div>
> <div class="mt-2"><span class="text-yellow-600"><i class="fa-solid fa-circle-exclamation fa-xl"></i> warning : </span> Something not good happened, but it isn't an error.</div>
> <div class="mt-2"><span class="text-red-600"><i class="fa-solid fa-circle-xmark fa-xl"></i> error : </span> Some sort of program error occurred.</div>
> <div class="mt-2"><span class="text-green-700"><i class="fa-solid fa-circle-check fa-xl"></i> success : </span> Indicates successful completion of an action.</div>
> <div class="mt-2"><span class="text-blue-600"><i class="fa-solid fa-circle-info fa-xl"></i> info : </span> Provides informational messages to users.</div>
> <div class="mt-2"><span class="text-yellow-600"><i class="fa-solid fa-circle-exclamation fa-xl"></i> warning : </span> Alerts users to potential issues that are not errors.</div>
> <div class="mt-2"><span class="text-red-600"><i class="fa-solid fa-circle-xmark fa-xl"></i> error : </span> Notifies users of errors or problems encountered.</div>
---
## <i class="fa-duotone fa-list-radio"></i> Why use {% PHPFlasher %} ?
## <i class="fa-duotone fa-list-radio"></i> Why {% PHPFlasher %} ?
{% PHPFlasher %} supports popular notification libraries :
<span class="text-indigo-900">[__toastr.js__](/library/toastr/)</span>,
<span class="text-indigo-900">[__sweetalert 2__](/library/sweetalert/)</span>,
<span class="text-indigo-900">[__noty__](/library/noty/)</span> and
<span class="text-indigo-900">[__notyf__](/library/notyf/)</span>.
You have a wide range of options to choose from to suit your specific needs. Whether you want to display simple toast messages or more sophisticated alerts,
{% PHPFlasher %} has you covered.
Overall, {% PHPFlasher %} is a versatile and easy-to-use library
that can greatly enhance the user experience of your website or application.
Give it a try and see the difference it can make for yourself!
* Display multiple notifications at the same time
* Easily display notifications from <i class="fa-brands fa-js-square text-yellow-600 fa-xl"></i> JavaScript with a small footprint
* LTR <i class="fa-duotone fa-signs-post text-indigo-900 fa-xl"></i> and Dark-mode <i class="fa-duotone fa-circle-half-stroke text-indigo-900 fa-xl"></i> support
* Framework-agnostic with <a href="https://laravel.com/" class="text-indigo-900"><i class="fa-brands fa-laravel text-red-900 fa-xl"></i> <strong>Laravel</strong></a> and <a href="https://symfony.com/" class="text-indigo-900"><i class="fa-brands fa-symfony text-black fa-xl"></i> <strong>Symfony</strong></a> implementations
* <i class="fa-duotone fa-sidebar text-indigo-900 fa-xl"></i> PHPSTORM Autocomplete
* You can always create an adapter yourself <i class="fa-duotone fa-screwdriver-wrench fa-xl text-indigo-900"></i> if desired
* ...and more
- **Broad Library Support**: PHPFlasher integrates with several popular notification libraries, including [toastr.js](/library/toastr/), [SweetAlert 2](/library/sweetalert/), [Noty](/library/noty/), and [Notyf](/library/notyf/).
- **Ease of Use**: Designed with all levels of developers in mind, from beginners to experienced professionals.
- **Flexibility**: Offers extensive customization options for notification styling and behaviors.
- **Framework Compatibility**: Seamlessly integrates with {% Laravel %} and {% Symfony %}, with options for custom adapter creation.
- **Developer Friendly**: Features PHPStorm autocomplete for easier coding and integration.
---
## <i class="fa-duotone fa-list-radio"></i> Getting Started
* **[Installation](/installation/)**
* **[Toastr](/library/toastr/)**
* **[Noty](/library/noty/)**
* **[Notyf](/library/notyf/)**
* **[Sweet Alert](/library/sweetalert/)**
Dive into PHPFlasher with our straightforward guides and documentation to seamlessly integrate flash messaging into your projects:
## <i class="fa-duotone fa-list-radio"></i> Sponsors
- [**Symfony Guide**](/Symfony/)
- [**Laravel Guide**](/Laravel/)
- [**Toastr Library**](/library/toastr/)
- [**Noty Library**](/library/noty/)
- [**Notyf Library**](/library/notyf/)
- [**Sweet Alert Library**](/library/sweetalert/)
We are grateful for the support provided by our sponsors, who have made it possible for us to develop and improve the package. Special thanks to:
## <i class="fa-duotone fa-list-radio"></i> Community and Contributions
* [Nashwan Abdullah](https://github.com/codenashwan) via PayPal, check out his youtube channel [Rstacode](https://www.youtube.com/rstacode)
* [Salma Mourad](https://github.com/salmayno)
* [Arvid de Jong](https://github.com/darviscommerce)
## <i class="fa-duotone fa-list-radio"></i> Contributors
We are grateful for the contributions of our contributors, who have been instrumental in helping us to develop and improve the package. Thank you to:
* [Ash Allen](https://github.com/ash-jc-allen) for creating our logo, check out his :
* **Battle Ready Laravel** book : [https://battle-ready-laravel.com](https://battle-ready-laravel.com)
* blog : [https://ashallendesign.co.uk/blog](https://ashallendesign.co.uk/blog)
* [Tony Murray](https://github.com/murrant)
* [Stéphane P](https://github.com/n3wborn)
* [Lucas Maciel](https://github.com/LucasStorm)
* [Antoni Siek](https://github.com/ImJustToNy)
{% PHPFlasher %} thrives on community contributions. Your feedback, code contributions, and feature suggestions are invaluable to us. Explore our [GitHub repository](https://github.com/php-flasher/php-flasher) to see how you can become part of the PHPFlasher community. Let's build something great together!
-397
View File
@@ -1,397 +0,0 @@
---
permalink: /installation/
redirect_from: /docs/installation/
title: Installation
description: Install only the specific components you need for your project with PHPFlasher, a modular PHP library for displaying flash notification messages. Simply include the library in your composer.json file and run the composer install command to get started.
---
{% PHPFlasher %} is modular and consists of multiple libraries,
allowing users to install and use only the specific components they need for their project.
## <i class="fa-duotone fa-list-radio"></i> Installation
{% PHPFlasher %} can be installed using composer :
**<i class="fa-brands fa-laravel text-red-900 fa-xl"></i> Laravel**:
```shell
composer require php-flasher/flasher-laravel
```
Then, run:
```shell
php artisan flasher:install
```
<br />
**<i class="fa-brands fa-symfony text-black fa-xl"></i> Symfony**:
```shell
composer require php-flasher/flasher-symfony
```
Then, run:
```shell
php bin/console flasher:install
```
---
{% PHPFlasher %} includes a default notification style <i class="fa-duotone fa-comment-captions text-yellow-600"></i>, but users can also install additional adapters to customize the appearance of notifications within their projects such as :
* **[Toastr](/library/toastr/)**
* **[Noty](/library/noty/)**
* **[Notyf](/library/notyf/)**
* **[Sweet Alert](/library/sweetalert/)**
---
## <i class="fa-duotone fa-list-radio"></i> General Usage
To display a notification message, you can either use the `flash()` helper method or obtain an instance of `flasher` from the service container.
Then, before returning a view or redirecting, call the `success()` method and pass in the desired message to be displayed.
{% assign id = '#/ PHPFlasher' %}
{% assign type = 'success' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
```php
{{ id }}
class BookController
{
public function saveBook()
{
// ...
flash('{{ message }}');
flash()->success('{{ site.data.messages["success"] | sample }}');
// ... redirect or render the view
}
/**
* if you prefer to use dependency injection
*/
public function register(FlasherInterface $flasher)
{
// ...
$flasher->success('{{ site.data.messages["success"] | sample }}');
// ... redirect or render the view
}
}
```
<br />
It's important to choose a message that is clear and concise, and that accurately reflects the outcome of the operation. <br />
In this case, `"Book has been created successfully!"` is already a good message,
but you may want to tailor it to fit the specific context and language of your application.
> Using this package is actually pretty easy. Adding notifications to your application actually require only one line of code.
{% assign id = '#/ usage success' %}
{% assign type = 'success' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
```php
{{ id }}
flash()->{{ type }}('{{ message }}');
```
{% assign id = '#/ usage error' %}
{% assign type = 'error' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
```php
{{ id }}
flash()->{{ type }}('{{ message }}');
```
{% assign id = '#/ usage warning' %}
{% assign type = 'warning' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
```php
{{ id }}
flash()->{{ type }}('{{ message }}');
```
{% assign id = '#/ usage info' %}
{% assign type = 'info' %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
```php
{{ id }}
flash()->{{ type }}('{{ message }}');
```
---
These four methods (`success`, `error`, `warning`, `info`) are simply convenience shortcuts for the `flash` method,
allowing you to specify the `type` and `message` in a single method call rather than having to pass both as separate arguments to the `flash` method.
```php
flash()->flash(string $type, string $message, string $title = null, array $options = [])
```
{% assign id = '#/ usage flash' %}
{% assign type = site.data.messages.types | sample %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
```php
{{ id }}
flash()->flash('{{ type }}', '{{ message }}');
```
| param | description |
|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `$type` | Notification type : <span class="text-white bg-green-600 px-2 py-1 rounded">success</span>, <span class="text-white bg-red-600 px-2 py-1 rounded">error</span>, <span class="text-white bg-yellow-600 px-2 py-1 rounded">warning</span>, <span class="text-white bg-blue-600 px-2 py-1 rounded">info</span> ....etc |
| `$message` | The body of the message you want to deliver to your user. This may contain HTML. If you add links, be sure to add the appropriate classes for the framework you are using. |
| `$title` | The notification title, Can also include HTML |
| `$options` | Custom options for javascript libraries (toastr, noty, notyf ...etc) | |
---
## <i class="fa-duotone fa-list-radio"></i> Modifiers
<p id="method-options"><a href="#method-options" class="anchor"><i class="fa-duotone fa-link"></i> options</a></p>
You can specify **custom options** for the flash messages when using a JavaScript library like `toastr`, `noty`, or `notyf`. <br /><br />
The `options()` method allows you to set multiple options at once by passing an array of `key-value` pairs,
while the `option()` method allows you to set a single option by specifying its name and value as separate arguments. <br /><br />
The optional `$merge` argument for the `options()` method can be used to specify whether the new options should be merged with any existing options,
or whether they should overwrite them.
```php
flash()->options(array $options, bool $merge = true);
```
> Refer to the documentation for your chosen JavaScript library to see which options are available and how they should be formatted.
{% assign id = '#/ usage options' %}
{% assign type = site.data.messages.types | sample %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{"timeout": 3000, "position": "top-center"}' %}
{% include example.html %}
```php
{{ id }}
flash()
->options([
'timeout' => 3000, // 3 seconds
'position' => 'top-center',
])
->{{ type }}('{{ message }}');
```
| param | description |
|------------|--------------------------------------------------------------------------------------|
| `$options` | Custom options to be passed to the javascript libraries (toastr, noty, notyf ...etc) |
| `$merge` | Merge options if you call the options method multiple times |
---
<p id="method-option"><a href="#method-option" class="anchor"><i class="fa-duotone fa-link"></i> option</a></p>
Set a single option by specifying its name and value as separate arguments.
```php
flash()->option(string $option, mixed $value);
```
{% assign id = '#/ usage option' %}
{% assign type = site.data.messages.types | sample %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{"timeout": 3000, "position": "top-center"}' %}
{% include example.html %}
```php
{{ id }}
flash()
->option('position', 'top-center')
->option('timeout', 3000)
->{{ type }}('{{ message }}');
```
| param | description |
|-----------|--------------|
| `$option` | Option key |
| `$value` | Option value |
---
<p id="method-priority"><a href="#method-priority" class="anchor"><i class="fa-duotone fa-link"></i> priority</a></p>
Sets the priority of a flash message, the highest priority will be displayed first.
```php
flash()->priority(int $priority);
```
{% assign id = '#/ usage priority' %}
{% assign successMessage = site.data.messages['success'] | sample | prepend: 'Priority 3 → ' %}
{% assign errorMessage = site.data.messages['error'] | sample | prepend: 'Priority 1 → ' %}
{% assign warningMessage = site.data.messages['warning'] | sample | prepend: 'Priority 4 → ' %}
{% assign infoMessage = site.data.messages['info'] | sample | prepend: 'Priority 2 → ' %}
<script type="text/javascript">
messages["{{ id }}"] = [
{
handler: "flasher",
type: "warning",
message: "{{ warningMessage }}",
options: {},
},
{
handler: "flasher",
type: "success",
message: "{{ successMessage }}",
options: {},
},
{
handler: "flasher",
type: "info",
message: "{{ infoMessage }}",
options: {},
},
{
handler: "flasher",
type: "error",
message: "{{ errorMessage }}",
options: {},
},
];
</script>
```php
{{ id }}
flash()
->priority(3)
->success('{{ successMessage }}');
flash()
->priority(1)
->error('{{ errorMessage }}');
flash()
->priority(4)
->warning('{{ warningMessage }}');
flash()
->priority(2)
->info('{{ infoMessage }}');
```
| param | description |
|-------------|--------------------------------------------------------------------------------------------|
| `$priority` | The priority of the notification, the higher the priority, the sooner it will be displayed |
---
<p id="method-hops"><a href="#method-hops" class="anchor"><i class="fa-duotone fa-link"></i> hops</a></p>
This method sets the number of requests that the flash message should persist for. By default, flash messages are only displayed for a single request and are then discarded. By setting the number of hops, the flash message will be persisted for multiple requests.
As an example, with a multi-page form, you may want to store messages until all pages have been filled.
{% assign id = '#/ usage hops' %}
{% assign type = site.data.messages.types | sample %}
{% assign message = site.data.messages[type] | sample %}
{% assign options = '{}' %}
{% include example.html %}
```php
flash()->hops(int $hops);
```
```php
flash()
->hops(2)
->{{ type }}('{{ message }}');
```
| param | description |
|---------|---------------------------------------------------------------|
| `$hops` | indicate how many requests the flash message will persist for |
---
<p id="method-translate"><a href="#method-translate" class="anchor"><i class="fa-duotone fa-link"></i> translate</a></p>
This method sets the `locale` to be used for the translation of the flash message. If a non-null value is provided,
the flash message will be translated into the specified language. If null is provided, the **default** `locale` will be used.
```php
flash()->translate(string $locale = null);
```
{% assign id = '#/ usage translate' %}
{% assign type = 'success' %}
{% assign message = 'تمت العملية بنجاح.' %}
{% assign title = 'تهانينا' %}
{% assign options = '{"rtl": true, "position": "top-right"}' %}
{% include example.html %}
```php
{{ id }}
flash()
->translate('ar')
->{{ type }}('Your request was processed successfully.', 'Congratulations!');
```
{% assign id = '#/ usage translate with position' %}
{% assign type = 'success' %}
{% assign message = 'تمت العملية بنجاح.' %}
{% assign title = 'تهانينا' %}
{% assign options = '{"rtl": true, "position": "top-left"}' %}
{% include example.html %}
```php
{{ id }}
flash()
->translate('ar')
->option('position', 'top-left')
->{{ type }}('Your request was processed successfully.', 'Congratulations!');
```
| param | description |
|-----------|------------------------------------------------------------------------------|
| `$locale` | The locale to be used for the translation, or null to use the default locale |
It is **important** to note that the `translate()` method only sets the locale to be used for the translation of the flash message.
It does not actually perform the translation itself.
In order to translate the flash message, you will need to provide the appropriate translation keys in your translation files.
In the above example, to translate the flash message into `Arabic`, If you are using **<i class="fa-brands fa-laravel text-red-900 fa-xl"></i> Laravel** you will need to add the following keys to the `resources/lang/ar/messages.php` file:
```php
return [
'Your request was processed successfully.' => 'تمت العملية بنجاح.',
'Congratulations!' => 'تهانينا',
];
```
+42 -46
View File
@@ -1,28 +1,24 @@
---
permalink: /symfony/
title: Symfony
description: Easily add flash notification messages to your Symfony application with PHPFlasher. Follow our step-by-step guide to install and use the library in your project, and start engaging and informing your users with powerful flash messages.
description: Integrate PHPFlasher in your Symfony application to enhance user experience with flash notifications. This open-source package simplifies the addition of engaging messages following user actions.
framework: symfony
---
## <i class="fa-duotone fa-list-radio"></i> {% PHPFlasher %} Symfony
## <i class="fa-duotone fa-list-radio"></i> {% PHPFlasher %} for Symfony
{% PHPFlasher %} is a trusted and well-supported package
that allows you to easily integrate flash notification messages into your <i class="fa-brands fa-symfony text-black fa-xl"></i> **Symfony** projects.
{% PHPFlasher %} offers a seamless way to incorporate flash notifications in {% Symfony %} projects, enhancing user feedback with minimal setup.
To use {% PHPFlasher %} in a **Symfony** application, you need :
Requirements for using {% PHPFlasher %} with Symfony:
> <i class="fa-brands fa-php fa-2xl text-blue-900 mr-1 mb-1"></i> **PHP** >= 8.2
> <i class="fa-brands fa-symfony fa-2xl text-black mr-1 ml-4"></i> **Symfony** >= 7.0
> <i class="fa-brands fa-php fa-2xl text-blue-900 mr-1 mb-1"></i> **PHP** v8.2 or higher
> <i class="fa-brands fa-symfony fa-2xl text-black mr-1 ml-4"></i> **Symfony** v7.0 or higher
---
## <i class="fa-duotone fa-list-radio"></i> Installation
{% PHPFlasher %} is modular and consists of multiple libraries,
allowing users to install and use only the specific components they need for their project.
{% PHPFlasher %} can be installed using composer :
{% PHPFlasher %}'s modular design lets you select and install only the components your project needs.
```shell
composer require php-flasher/flasher-symfony
@@ -54,7 +50,7 @@ php bin/console flasher:install
As optional, if you want to modify the default configuration, you can publish the configuration file:
```bash
php bin/console flasher:install
php bin/console flasher:install --config
```
The configuration file will be located at `config/packages/flasher.yaml` and will have the following content:
@@ -270,33 +266,33 @@ resource: ''
{% assign infoMessage = 'سيتم تحديث هذه الصفحة في غضون 10 دقائق.' %}
<script type="text/javascript">
messages["{{ id }}"] = [
messages['{{ id }}'] = [
{
handler: "flasher",
type: "success",
message: "{{ successMessage }}",
title: "نجاح",
handler: 'flasher',
type: 'success',
message: '{{ successMessage }}',
title: 'نجاح',
options: {},
},
{
handler: "flasher",
type: "error",
message: "{{ errorMessage }}",
title: "خطأ",
handler: 'flasher',
type: 'error',
message: '{{ errorMessage }}',
title: 'خطأ',
options: {},
},
{
handler: "flasher",
type: "warning",
message: "{{ warningMessage }}",
title: "تحذير",
handler: 'flasher',
type: 'warning',
message: '{{ warningMessage }}',
title: 'تحذير',
options: {},
},
{
handler: "flasher",
type: "info",
message: "{{ infoMessage }}",
title: "معلومة",
handler: 'flasher',
type: 'info',
message: '{{ infoMessage }}',
title: 'معلومة',
options: {},
},
@@ -321,33 +317,33 @@ flash()->info('{{ infoMessage }}');
{% assign infoMessage = "Cette page sera mise à jour dans 10 minutes."%}
<script type="text/javascript">
messages["{{ id }}"] = [
messages['{{ id }}'] = [
{
handler: "flasher",
type: "success",
message: "{{ successMessage }}",
title: "Succès",
handler: 'flasher',
type: 'success',
message: '{{ successMessage }}',
title: 'Succès',
options: {},
},
{
handler: "flasher",
type: "error",
message: "{{ errorMessage }}",
title: "Erreur",
handler: 'flasher',
type: 'error',
message: '{{ errorMessage }}',
title: 'Erreur',
options: {},
},
{
handler: "flasher",
type: "warning",
message: "{{ warningMessage }}",
title: "Avertissement",
handler: 'flasher',
type: 'warning',
message: '{{ warningMessage }}',
title: 'Avertissement',
options: {},
},
{
handler: "flasher",
type: "info",
message: "{{ infoMessage }}",
title: "Information",
handler: 'flasher',
type: 'info',
message: '{{ infoMessage }}',
title: 'Information',
options: {},
},
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "library",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher Laravel Adapter: Seamlessly integrate powerful flash messaging into your Laravel projects. Boost user engagement and improve user experience with this robust, flexible tool. Designed with developers in mind, PHPFlasher makes managing user feedback in Laravel applications as simple as ever.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Seamlessly integrate flash notifications into your Laravel applications with PHPFlasher. Enhance user feedback and engagement with minimal setup.",
"keywords": ["laravel", "php", "flash-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "library",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Use Noty.js for engaging flash notifications in Laravel with PHPFlasher. Combine the power of Noty.js and Laravel for rich, interactive user notifications.",
"keywords": ["laravel", "noty.js", "flash-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "symfony-bundle",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Bring Noty.js flash notifications to Symfony projects using PHPFlasher. Leverage Noty.js within Symfony to elevate user notifications.",
"keywords": ["symfony", "noty.js", "flash-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "library",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Integrate Notyf's minimalist flash notifications with Laravel via PHPFlasher. Enhance your Laravel apps with sleek, concise user notifications.",
"keywords": ["laravel", "notyf", "flash-notifications", "minimalist-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "symfony-bundle",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Adopt Notyf's simple flash notifications in Symfony projects with PHPFlasher. Streamline user notifications in Symfony with Notyf's elegant simplicity.",
"keywords": ["symfony", "notyf", "flash-notifications", "minimalist-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "library",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher Core - A powerful pure PHP library, dedicated to bringing elegant flash messages to your web applications. Whether it's Laravel or Symfony, PHPFlasher ensures seamless user feedback integration, boosting user engagement and enriching the overall experience. Built with an intuitive design, it caters to developers across the spectrum, offering a reliable, flexible solution that is also framework-agnostic. PHPFlasher Core is built for RTL and Dark Mode support, and even includes PHPStorm auto-complete feature for easy development.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "The foundational PHP library for PHPFlasher, enabling the creation of framework-agnostic flash notifications. Ideal for building custom integrations or for use in PHP projects.",
"keywords": ["php", "flasher-core", "framework-agnostic", "custom-integrations", "flash-notifications", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "library",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Incorporate SweetAlert's interactive notifications into Laravel applications with PHPFlasher. Enhance user dialogs with SweetAlert and Laravel.",
"keywords": ["laravel", "sweetalert", "sweetalert 2", "flash-notifications", "dynamic-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "symfony-bundle",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Utilize SweetAlert for dynamic notifications in Symfony with PHPFlasher. Bring engaging user alerts and confirmations to Symfony apps.",
"keywords": ["symfony", "sweetalert", "sweetalert 2", "flash-notifications", "dynamic-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "symfony-bundle",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher Symfony Bundle: Supercharge your Symfony projects with this robust flash message package. Enhance user engagement with intuitive, easy-to-integrate flash messaging. Tailored for developers, PHPFlasher provides a powerful solution for managing user feedback in Symfony applications.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Integrate flash notifications into Symfony projects effortlessly with PHPFlasher. Improve user experience and application feedback loops easily.",
"keywords": ["symfony", "php", "flash-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -10
View File
@@ -3,16 +3,8 @@
"type": "library",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher Toastr for Laravel - A Laravel-specific extension of PHPFlasher for Toastr notifications, enhancing user interactions with aesthetically pleasing and responsive toast messages.",
"keywords": [
"php-flasher",
"laravel",
"toastr",
"flash-messages",
"notification-system",
"user-experience",
"laravel-package"
],
"description": "Leverage Toastr for stylish toast notifications in Laravel with PHPFlasher. Add Toastr's sleek notifications to your Laravel projects effortlessly.",
"keywords": ["laravel", "toastr", "flash-notifications", "dynamic-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"
+2 -14
View File
@@ -3,20 +3,8 @@
"type": "symfony-bundle",
"license": "MIT",
"homepage": "https://php-flasher.io",
"description": "PHPFlasher Toastr Symfony Bundle - Leverages PHPFlasher for integrating Toastr notifications in Symfony projects. Offers a rich set of features for enhanced user notifications.",
"keywords": [
"flash-messages",
"php-notification-system",
"laravel-notification",
"symfony-notification",
"user-feedback-tools",
"web-application-notifications",
"php-user-interface",
"customizable-alerts-php",
"interactive-web-notifications",
"php-messaging-library",
"user-engagement-php"
],
"description": "Integrate Toastr's smooth toast notifications into Symfony projects using PHPFlasher. Enhance Symfony applications with Toastr's refined visuals.",
"keywords": ["laravel", "toastr", "flash-notifications", "dynamic-notifications", "phpflasher", "user-feedback", "open-source"],
"support": {
"issues": "https://github.com/php-flasher/php-flasher/issues",
"source": "https://github.com/php-flasher/php-flasher"