From 4f09f06e07410c71e584c38bca7ef3aae667a94f Mon Sep 17 00:00:00 2001 From: Younes ENNAJI Date: Tue, 18 Mar 2025 22:38:47 +0000 Subject: [PATCH] update symfony implementation --- docs/_layouts/symfony.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/_layouts/symfony.html b/docs/_layouts/symfony.html index 7469db5d..6f9041c7 100644 --- a/docs/_layouts/symfony.html +++ b/docs/_layouts/symfony.html @@ -109,7 +109,7 @@ layout: default
-

Using older PHP or Symfony versions?

+

Using older PHP or Symfony versions?

If you need to use PHP < v8.2 or Symfony < v7.0, use PHPFlasher v1 instead. @@ -193,7 +193,7 @@ layout: default

-

Ready in under a minute!

+

Ready in under a minute!

That's it! No need for complex configuration - PHPFlasher works right out of the box with sensible defaults.

@@ -208,7 +208,7 @@ layout: default
-

Best Practice

+

Best Practice

Commit the installed assets to your version control system to ensure everyone on your team has the same notification experience.

@@ -272,7 +272,7 @@ class ProductController extends AbstractController
-

Pro Tip: Two Ways to Use PHPFlasher

+

Pro Tip: Two Ways to Use PHPFlasher

PHPFlasher provides two ways to create notifications: @@ -559,7 +559,7 @@ class ArticleController extends AbstractController

-

Best Practice: Consistent Messaging

+

Best Practice: Consistent Messaging

Use the same notification style and wording for similar operations across your application. This provides a consistent user experience.

@@ -714,7 +714,7 @@ public function saveApi(Request $request): JsonResponse
-

Expert Tip: AJAX Integration

+

Expert Tip: AJAX Integration

PHPFlasher automatically handles AJAX responses — notifications from the server appear without any additional code. This works with fetch, axios, jQuery, and other AJAX methods.

@@ -791,7 +791,7 @@ class OrderController extends AbstractController
-

Best Practice: Dependency Injection

+

Best Practice: Dependency Injection

Using dependency injection with FlasherInterface makes your code more testable and follows Symfony best practices. It's ideal for services and larger applications.

@@ -915,7 +915,7 @@ flasher:
-

Expert Advice

+

Expert Advice

The default configuration works great for most projects. Only customize if you need specific behaviors like:

-

What are presets?

+

What are presets?

Presets are pre-defined notification configurations that you can reuse throughout your application. They help maintain consistent messaging and reduce code duplication.

@@ -1144,7 +1144,7 @@ class PaymentController extends AbstractController
-

Best Practice: Centralized Message Management

+

Best Practice: Centralized Message Management

Store all your notification presets in one place to ensure consistent messaging across your application. This makes it easy to update notification wording or styling globally.

@@ -1425,7 +1425,7 @@ flash()->preset('welcome_user', ['name' => $user->getFirstName()]);
-

Best Practice: Centralize Your Translations

+

Best Practice: Centralize Your Translations

Store all user-facing notification messages in translation files rather than hardcoding them. This makes it much easier to update wording or add new languages later.