Update README and JavaScript documentation

This commit is contained in:
Younes ENNAJI
2026-03-02 02:01:00 +00:00
parent 88f7546b50
commit 1f7d884c4d
2 changed files with 9 additions and 17 deletions
+5 -13
View File
@@ -59,7 +59,7 @@ flash()->success('Welcome aboard! Your account is ready.');
|---|:---:|:---:|
| **Zero JavaScript** | Write PHP only, frontend handled automatically | Requires manual JS setup |
| **Auto Asset Injection** | CSS/JS injected automatically | Manual script tags needed |
| **26 Built-in Themes** | Amazon, iOS, Slack, Material & more | Limited or no themes |
| **17 Built-in Themes** | Amazon, iOS, Slack, Material & more | Limited or no themes |
| **4 Notification Libraries** | Toastr, SweetAlert, Noty, Notyf | Single library only |
| **Livewire Integration** | Full event system support | Limited or none |
| **RTL Support** | Built-in right-to-left | Often missing |
@@ -94,9 +94,9 @@ flash()->success('Profile updated!', [
---
## 26 Beautiful Themes
## 17 Beautiful Themes
PHPFlasher includes **26 professionally designed themes** ready to use:
PHPFlasher includes **17 professionally designed themes** ready to use:
```php
flash()->success('Welcome!', ['theme' => 'amazon']);
@@ -111,12 +111,10 @@ flash()->success('Welcome!', ['theme' => 'material']);
| Theme | Style |
|-------|-------|
| `flasher` | Default clean design |
| `amazon` | Amazon-inspired |
| `bootstrap` | Bootstrap style |
| `amazon` | Amazon-inspired e-commerce |
| `ios` | Apple iOS notifications |
| `slack` | Slack messaging style |
| `material` | Google Material Design |
| `tailwind` | Tailwind CSS inspired |
| `google` | Google notifications |
| `facebook` | Facebook style |
| `minimal` | Ultra-clean minimal |
@@ -129,10 +127,6 @@ flash()->success('Welcome!', ['theme' => 'material']);
| `onyx` | Dark mode sleek |
| `ruby` | Bold ruby accents |
| `sapphire` | Elegant blue style |
| `shadow` | Soft shadow effects |
| `spectrum` | Colorful spectrum |
| `sunset` | Warm sunset colors |
| `zen` | Calm minimal design |
[**See all themes with live demos →**](https://php-flasher.io/themes)
@@ -296,11 +290,9 @@ flasher:
For complete documentation, visit **[php-flasher.io](https://php-flasher.io)**
- [Installation Guide](https://php-flasher.io/installation)
- [Usage & Examples](https://php-flasher.io/usage)
- [Themes Gallery](https://php-flasher.io/themes)
- [Livewire Integration](https://php-flasher.io/livewire)
- [Configuration Reference](https://php-flasher.io/configuration)
- [API Reference](https://php-flasher.io/api)
- [JavaScript Usage](https://php-flasher.io/javascript)
---
+4 -4
View File
@@ -26,7 +26,7 @@ To pull in the <strong><span class="text-indigo-900">PHP<span class="text-indigo
</span>
```html
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@1.2.4/dist/flasher.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@2.2.0/dist/flasher.min.js"></script>
```
---
@@ -55,7 +55,7 @@ flasher.info("Welcome back");
or if you are using a cdn like this:
```html
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@1.2.4/dist/flasher.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@2.2.0/dist/flasher.min.js"></script>
<script>
flasher.error("Oops! Something went wrong!");
flasher.warning("Are you sure you want to proceed ?");
@@ -72,8 +72,8 @@ First grab the CDN for any js library adapter supported by <strong><span class="
and then call the `create()` method on flasher object :
```html
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@1.2.4/dist/flasher.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher-toastr@1.2.4/dist/flasher-toastr.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@2.2.0/dist/flasher.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher-toastr@2.2.0/dist/flasher-toastr.min.js"></script>
<script>
const factory = flasher.use('toastr');
factory.error("Oops! Something went wrong!");