invalid method calls to method where #35
-
We have a Laravel command based on Clarkeash Doorman's Invitation package and Enlightn mentioned that line 41 Here our command code: <?php
namespace App\Console\Commands;
use Clarkeash\Doorman\Models\Invite;
use Illuminate\Console\Command;
class InviteClean extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'invite:clean';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Remove invites that were expired';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
Invite::where('valid_until', '<', now())
->where('uses', 0)
->delete();
}
} I fail to understand the issue here. Would someone please explain what I am missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
@jasperf can you run this with the |
Beta Was this translation helpful? Give feedback.
-
Hi @jasperf, the issue is with the I would suggest that it's best for you to ignore this error using the |
Beta Was this translation helpful? Give feedback.
Hi @jasperf, the issue is with the
@mixin
docblock annotation here. Here's a related issue.I would suggest that it's best for you to ignore this error using the
ignore_errors
config option. Docs here.