diff --git a/docs/_data/manifest.json b/docs/_data/manifest.json index 29c28bb1..ebbc3fdc 100644 --- a/docs/_data/manifest.json +++ b/docs/_data/manifest.json @@ -1,5 +1,5 @@ { - "dist/main.css": "/dist/main.bc57507d.css", + "dist/main.css": "/dist/main.cea611bb.css", "dist/main.js": "/dist/main.8b056786.js", "dist/455.3a7b4474.css": "/dist/455.3a7b4474.css", "dist/455.095e6545.js": "/dist/455.095e6545.js", diff --git a/docs/_posts/2025-03-30-integrating-phpflasher-with-laravel.html b/docs/_posts/2025-03-30-integrating-phpflasher-with-laravel.html index abdfafb4..ed0c9557 100644 --- a/docs/_posts/2025-03-30-integrating-phpflasher-with-laravel.html +++ b/docs/_posts/2025-03-30-integrating-phpflasher-with-laravel.html @@ -4,7 +4,7 @@ title: "Integrating PHPFlasher with Laravel: A Complete Guide for Beginners" date: 2025-03-30 04:09:31 author: yoeunes github_username: yoeunes -twitter_username: yoeunes_en +twitter_username: yoeunes linkedin_username: younes--ennaji author_bio: "Creator and maintainer of PHPFlasher. Passionate about building elegant and intuitive PHP libraries that improve developer experience." tags: [laravel, tutorial, beginner] @@ -14,9 +14,121 @@ reading_time: 10 featured: true --- +
- Laravel is one of the most popular PHP frameworks, known for its elegant syntax and developer-friendly features. Adding flash notifications to your Laravel application becomes incredibly straightforward with PHPFlasher. In this complete guide, you'll learn everything you need to know to get started with PHPFlasher v2 in your Laravel projects.
@@ -68,11 +180,11 @@ featured: trueFirst, install PHPFlasher using Composer. The process is extremely simple:
+First, install PHPFlasher using Composer. The process is extremely simple:
-composer require php-flasher/flasher-laravel
+ Zero Configuration
++ That's it! No service provider registration, no publishing assets, no template modifications. PHPFlasher v2 auto-registers and injects everything you need. +
composer require php-flasher/flasher-laravel
-No configuration needed!
-- The service provider will be automatically registered through Laravel's package discovery. You're ready to go without any additional setup. PHPFlasher v2 automatically injects all necessary assets. -
-Now you can create beautiful notifications with a single line of code:
-Once installed, you can immediately start using PHPFlasher in your controllers with a single line of code. Here's a simple example:
- -// In your controller
+ // In your controller
public function store(Request $request)
{
// Process the form submission
@@ -173,6 +284,7 @@ public function store(Request $request)
return redirect()->route('users.index');
}
+ @if (session('message'))
<div class="alert alert-{{ session('alert-type') ?? 'info' }}">
{{ session('message') }}
@@ -221,9 +333,9 @@ public function update(Request $request, $id)
-
+
With PHPFlasher
-
+
In your controller:
@@ -238,131 +350,12 @@ public function update(Request $request, $id)
return redirect()->route('users.index');
}
- In your Blade template:
+ In your Blade template:
// Nothing needed! PHPFlasher v2 auto-injects everything