call static method in web.php laravel code example
Example: laravel call a static function
namespace App\Library;
class Utilities {
//added new user
public static function doBeforeTask() {
// ... you business logic.
}
}
// then do this in your controller
Utilities::doBeforeTask();