static function model laravel
public static function isOpen($week)
{
return (new static)::where('week', $week)->first();
}
static function model laravel
public static function isOpen($week)
{
return (new static)::where('week', $week)->first();
}
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();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us