mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
Merge pull request #277 from php-flasher/dev
update livewire and inertiajs documentation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"dist/main.css": "/dist/main.f1c926c2.css",
|
||||
"dist/main.css": "/dist/main.0e65cac0.css",
|
||||
"dist/main.js": "/dist/main.8b056786.js",
|
||||
"dist/455.3a7b4474.css": "/dist/455.3a7b4474.css",
|
||||
"dist/455.095e6545.js": "/dist/455.095e6545.js",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
@@ -2,7 +2,7 @@
|
||||
"entrypoints": {
|
||||
"main": {
|
||||
"css": [
|
||||
"/dist/main.f1c926c2.css"
|
||||
"/dist/main.0e65cac0.css"
|
||||
],
|
||||
"js": [
|
||||
"/dist/main.8b056786.js"
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1703
-1
File diff suppressed because it is too large
Load Diff
@@ -739,7 +739,7 @@ class FlashController extends Controller
|
||||
public function getFlashMessages()
|
||||
{
|
||||
// Get all flash messages as an array
|
||||
$messages = flash()->render([], 'array');
|
||||
$messages = flash()->render('array');
|
||||
|
||||
return response()->json($messages);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
---
|
||||
layout: default
|
||||
permalink: /livewire/
|
||||
title: Livewire
|
||||
description: Learn how to add flash notifications to your Livewire application using PHPFlasher. This guide walks you through installation and usage, so you can engage your users with informative messages.
|
||||
adapter: flasher
|
||||
---
|
||||
|
||||
<div class="max-w-7xl mx-auto">
|
||||
@@ -471,9 +474,9 @@ class UserComponent extends Component
|
||||
public function render()
|
||||
{
|
||||
return <<<'HTML'
|
||||
<div>
|
||||
<button wire:click="deleteUser">Delete User</button>
|
||||
</div>
|
||||
<div>
|
||||
<button wire:click="deleteUser">Delete User</button>
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
@@ -509,7 +512,7 @@ class UserComponent extends Component
|
||||
<div class="flex space-x-1.5 mr-3">
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-red-500"></div>
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-yellow-500"></div>
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-green-500"></div>
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-green-500"></div>
|
||||
</div>
|
||||
<div class="text-white opacity-80 text-xs font-medium">PayloadStructure.php</div>
|
||||
</div>
|
||||
@@ -736,12 +739,11 @@ class PublishArticle extends Component
|
||||
{
|
||||
sweetalert()
|
||||
->option('title', 'Publish article?')
|
||||
->option('text', 'This will make the article visible to all users')
|
||||
->option('icon', 'question')
|
||||
->option('showCancelButton', true)
|
||||
->option('confirmButtonText', 'Yes, publish it!')
|
||||
->option('cancelButtonText', 'Not yet')
|
||||
->fire();
|
||||
->question('Are you sure you want to publish this article?');
|
||||
}
|
||||
|
||||
#[On('sweetalert:confirmed')]
|
||||
@@ -757,12 +759,11 @@ class PublishArticle extends Component
|
||||
// Second notification (after a delay)
|
||||
sweetalert()
|
||||
->timer(3000)
|
||||
->option('title', 'Would you like to share it?')
|
||||
->option('showCancelButton', true)
|
||||
->option('confirmButtonText', 'Yes, share it!')
|
||||
->option('cancelButtonText', 'No thanks')
|
||||
->option('actionType', 'share') // Custom option to identify action
|
||||
->fire();
|
||||
->question('Do you want to share this article?');
|
||||
}
|
||||
|
||||
#[On('sweetalert:confirmed')]
|
||||
@@ -800,8 +801,8 @@ class PublishArticle extends Component
|
||||
</p>
|
||||
|
||||
<!-- Alpine.js integration -->
|
||||
<div class="grid md:grid-cols-2 gap-6 mb-6">
|
||||
<div class="bg-white rounded-lg p-5 border border-slate-200 shadow-sm">
|
||||
<div class="mb-6">
|
||||
<div class="bg-white rounded-lg p-5 border border-slate-200 shadow-sm mb-4">
|
||||
<div class="flex items-center mb-3">
|
||||
<div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mr-3">
|
||||
<svg class="w-5 h-5 text-blue-600" fill="currentColor" viewBox="0 0 24 24">
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
permalink: /livewire/
|
||||
title: Livewire
|
||||
description: Learn how to add flash notifications to your Livewire application using PHPFlasher. This guide walks you through installation and usage, so you can engage your users with informative messages.
|
||||
adapter: flasher
|
||||
layout: livewire
|
||||
---
|
||||
@@ -737,7 +737,7 @@ document.getElementById('saveForm').addEventListener('submit', function(e) {
|
||||
public function getFlashMessages(): JsonResponse
|
||||
{
|
||||
// Get all flash messages as an array
|
||||
$messages = flash()->render([], 'array');
|
||||
$messages = flash()->render('array');
|
||||
|
||||
return $this->json($messages);
|
||||
}</code></pre>
|
||||
|
||||
Reference in New Issue
Block a user