1public static function isOpen($week)
2{
3 return (new static)::where('week', $week)->first();
4}
1namespace App\Library;
2
3class Utilities {
4
5 //added new user
6 public static function doBeforeTask() {
7 // ... you business logic.
8 }
9}
10
11// then do this in your controller
12Utilities::doBeforeTask();