mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
Update README and JavaScript documentation
This commit is contained in:
@@ -59,7 +59,7 @@ flash()->success('Welcome aboard! Your account is ready.');
|
|||||||
|---|:---:|:---:|
|
|---|:---:|:---:|
|
||||||
| **Zero JavaScript** | Write PHP only, frontend handled automatically | Requires manual JS setup |
|
| **Zero JavaScript** | Write PHP only, frontend handled automatically | Requires manual JS setup |
|
||||||
| **Auto Asset Injection** | CSS/JS injected automatically | Manual script tags needed |
|
| **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 |
|
| **4 Notification Libraries** | Toastr, SweetAlert, Noty, Notyf | Single library only |
|
||||||
| **Livewire Integration** | Full event system support | Limited or none |
|
| **Livewire Integration** | Full event system support | Limited or none |
|
||||||
| **RTL Support** | Built-in right-to-left | Often missing |
|
| **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
|
```php
|
||||||
flash()->success('Welcome!', ['theme' => 'amazon']);
|
flash()->success('Welcome!', ['theme' => 'amazon']);
|
||||||
@@ -111,12 +111,10 @@ flash()->success('Welcome!', ['theme' => 'material']);
|
|||||||
| Theme | Style |
|
| Theme | Style |
|
||||||
|-------|-------|
|
|-------|-------|
|
||||||
| `flasher` | Default clean design |
|
| `flasher` | Default clean design |
|
||||||
| `amazon` | Amazon-inspired |
|
| `amazon` | Amazon-inspired e-commerce |
|
||||||
| `bootstrap` | Bootstrap style |
|
|
||||||
| `ios` | Apple iOS notifications |
|
| `ios` | Apple iOS notifications |
|
||||||
| `slack` | Slack messaging style |
|
| `slack` | Slack messaging style |
|
||||||
| `material` | Google Material Design |
|
| `material` | Google Material Design |
|
||||||
| `tailwind` | Tailwind CSS inspired |
|
|
||||||
| `google` | Google notifications |
|
| `google` | Google notifications |
|
||||||
| `facebook` | Facebook style |
|
| `facebook` | Facebook style |
|
||||||
| `minimal` | Ultra-clean minimal |
|
| `minimal` | Ultra-clean minimal |
|
||||||
@@ -129,10 +127,6 @@ flash()->success('Welcome!', ['theme' => 'material']);
|
|||||||
| `onyx` | Dark mode sleek |
|
| `onyx` | Dark mode sleek |
|
||||||
| `ruby` | Bold ruby accents |
|
| `ruby` | Bold ruby accents |
|
||||||
| `sapphire` | Elegant blue style |
|
| `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)
|
[**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)**
|
For complete documentation, visit **[php-flasher.io](https://php-flasher.io)**
|
||||||
|
|
||||||
- [Installation Guide](https://php-flasher.io/installation)
|
- [Installation Guide](https://php-flasher.io/installation)
|
||||||
- [Usage & Examples](https://php-flasher.io/usage)
|
|
||||||
- [Themes Gallery](https://php-flasher.io/themes)
|
- [Themes Gallery](https://php-flasher.io/themes)
|
||||||
- [Livewire Integration](https://php-flasher.io/livewire)
|
- [Livewire Integration](https://php-flasher.io/livewire)
|
||||||
- [Configuration Reference](https://php-flasher.io/configuration)
|
- [JavaScript Usage](https://php-flasher.io/javascript)
|
||||||
- [API Reference](https://php-flasher.io/api)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ To pull in the <strong><span class="text-indigo-900">PHP<span class="text-indigo
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
```html
|
```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:
|
or if you are using a cdn like this:
|
||||||
```html
|
```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>
|
<script>
|
||||||
flasher.error("Oops! Something went wrong!");
|
flasher.error("Oops! Something went wrong!");
|
||||||
flasher.warning("Are you sure you want to proceed ?");
|
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 :
|
and then call the `create()` method on flasher object :
|
||||||
|
|
||||||
```html
|
```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 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-toastr@2.2.0/dist/flasher-toastr.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const factory = flasher.use('toastr');
|
const factory = flasher.use('toastr');
|
||||||
factory.error("Oops! Something went wrong!");
|
factory.error("Oops! Something went wrong!");
|
||||||
|
|||||||
Reference in New Issue
Block a user