laravel use static methods code example
Example 1: new static laravel
Explained like a charm
https://stackoverflow.com/questions/15898843/what-means-new-static
Example 2: 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();