未找到Phpstorm 10,laravel 5.1.11方法

未找到Phpstorm 10,laravel 5.1.11方法,php,phpstorm,laravel-5.1,Php,Phpstorm,Laravel 5.1,我对Laravel 5.1.11和PHPStorm 10感到疯狂,我的问题是我得到了臭名昭著的“方法未发现错误” 我已经安装了两个:Laravel插件和Barry的IDE助手。也是:插件已启用 我还参加了: “php artisan clear已编译”, “php artisan ide帮助程序:生成”, “php artisan优化” 问题是: 例如:在我的资源控制器中,Customer::find($id);如果我转到Customer类并将其扩展为雄辩的话,它会得到方法“find”not f

我对Laravel 5.1.11和PHPStorm 10感到疯狂,我的问题是我得到了臭名昭著的“方法未发现错误”

我已经安装了两个:Laravel插件和Barry的IDE助手。也是:插件已启用

我还参加了: “php artisan clear已编译”, “php artisan ide帮助程序:生成”, “php artisan优化”

问题是:

例如:在我的资源控制器中,Customer::find($id);如果我转到Customer类并将其扩展为雄辩的话,它会得到方法“find”not found warning,但我个人为该类创建的方法会在IDE中得到方法not found warning

有什么想法吗

这是我的客户类:

namespace App\Models\Customer;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;



class Customer extends \Eloquent {

use SoftDeletes;

protected $table = 'customers';

public function Quotes(){
    return $this->hasMany('App\Models\Quotes\Quotes');
}

public function Invoices(){
    return $this->hasMany('App\Models\Invoices\Invoices');
}

public function Comprobante() {
    return $this->hasOne('App\Models\Comprobantes\CompCustomer', 'customer_id');
}

public function User(){
    return $this->belongsTo('App\User', 'user_id', 'id');
}

public function Calc_Invoice(){
    $invoices = $this->Invoices()->get();

    $total = 0;
    foreach($invoices as $key){
        $total = $total + $key->total;
    }
    return $total;
}
}

向我们展示您的
客户
课程。您必须扩展Eloquent才能让
find()
这样的东西工作,因为它们是由Eloquent提供的。@ceejayoz有一个类,例如
$customer->Comprobante()->get()
在class\illumb\Database\Eloquent\Collection |\illumb\Database\Eloquent\Model | null中提供了
方法“Comprobante”
请在类和调用它的位置中尝试小写
Comprobante
。Laravel关系是区分大小写的,尽管PHP不是。此外,您不需要
->get()
-您可以执行
$customer->comprobante
,它将在幕后为您执行
->get()
。非常感谢您的输入,但是我不明白为什么我两次都使用正确的大小写时,大小写会有什么关系,不管怎样,我试过了,但都没用。我认为问题在于PHPStorm只在类
\illumb\Database\Eloquent\Collection | \illumb\Database\Eloquent\Model | nul中查找方法‌​l
且不在客户类别中。向我们展示您的
客户
类别。您必须扩展Eloquent才能让
find()
这样的东西工作,因为它们是由Eloquent提供的。@ceejayoz有一个类,例如
$customer->Comprobante()->get()
在class\illumb\Database\Eloquent\Collection |\illumb\Database\Eloquent\Model | null中提供了
方法“Comprobante”
请在类和调用它的位置中尝试小写
Comprobante
。Laravel关系是区分大小写的,尽管PHP不是。此外,您不需要
->get()
-您可以执行
$customer->comprobante
,它将在幕后为您执行
->get()
。非常感谢您的输入,但是我不明白为什么我两次都使用正确的大小写时,大小写会有什么关系,不管怎样,我试过了,但都没用。我认为问题在于PHPStorm只在类
\illumb\Database\Eloquent\Collection | \illumb\Database\Eloquent\Model | nul中查找方法‌​l
且不在客户类别中。