PHPackages                             chearaan/advice - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. chearaan/advice

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chearaan/advice
===============

Chearaan Tool

06PHP

Since Dec 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/chearaan/advice)[ Packagist](https://packagist.org/packages/chearaan/advice)[ RSS](/packages/chearaan-advice/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

advice
======

[](#advice)

Chearaan Tools

Using Composer composer require chearaan/advice

Add the service provider to config/app.php

Chearaan\\Advice\\AdviceServiceProvider::class, Optionally include the Facade in config/app.php if you'd like.

Advice =&gt; Chearaan\\Advice\\Facades\\Advice::class, Note, there is a advice() function available, so unless you really want to use the Facade, there's no need to include it.

Usage

Basic

From your application, call the flash method with a message and type. advice()-&gt;flash('Welcome back!', 'success');

Within a view, you can now check if a flash message exists and output it.

@if (advice()-&gt;ready())

{{ advice()-&gt;message() }}

@endifNotify is front-end framework agnostic, so you're free to easily implement the output however you choose. Options You can pass additional options to the flash method, which are then easily accessible within your view. advice()-&gt;flash('Welcome back!', 'success', \[ 'timer' =&gt; 3000, 'text' =&gt; 'It's really great to see you again', \]); Then, in your view. @if (advice()-&gt;ready()) &lt;script&gt; swal({ title: "{!! advice()-&gt;message() !!}", text: "{!! advice()-&gt;option('text') !!}", type: "{{ advice()-&gt;type() }}", @if (advice()-&gt;option('timer')) timer: {{ advice()-&gt;option('timer') }}, showConfirmButton: false @endif }); &lt;/script&gt; @endif

The above example uses SweetAlert, but the flexibily of Advice means you can easily use it with any JavaScript alert solution. Issues and contribution Just submit an issue or pull request through GitHub. Thanks!

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9942901?v=4)[chearaan](/maintainers/chearaan)[@chearaan](https://github.com/chearaan)

---

Top Contributors

[![chearaan](https://avatars.githubusercontent.com/u/9942901?v=4)](https://github.com/chearaan "chearaan (3 commits)")[![acetopnotch](https://avatars.githubusercontent.com/u/15903102?v=4)](https://github.com/acetopnotch "acetopnotch (1 commits)")

### Embed Badge

![Health badge](/badges/chearaan-advice/health.svg)

```
[![Health](https://phpackages.com/badges/chearaan-advice/health.svg)](https://phpackages.com/packages/chearaan-advice)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
