Support the ongoing development of Laravel.io →
posted 9 years ago
Architecture
Last updated 2 years ago.
0

For your own libraries (functions and classes) you can create a Libs directory (or any name you see fit) under app directory. Then put your functions and classes in files under this directory. For example AuthHelper.php file. When you want to use that file add this line to AuthController.php:

use App\Libs\AuthHelper;

Then you can use it like this:

AuthHelper::setReminderFlash($case, $email);

In short, you are free to create your own directories and libraries in the framework if you need.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Domcsore domcsore Joined 23 Apr 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.