Source: vumanhtrung.medium.com

Create Custom Helper Class in Laravel 7
In this article, let’s learn how to create a custom helper class in Laravel 7. Next, create a app\Utilities\SiteHelper.php file.

In config\app.php, add key and value in array of Aliases. And then in your composer.json file add the following “files” array to the autoload section. It should look something like this: Run follow command in Terminal: How to use: In controller code
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners