简体   繁体   中英

Unable to use Searchable in laravel model

I am trying to use Laravel Scout Searchable into my model but it gives me an error

Undefined type 'Laravel\Scout\Searchable'.

I have already included

use Laravel\Scout\Searchable; 

in the code. Could someone please tell me what am I doing wrong here?

I have followed the documentation as is until this point.

After a little bit of tinkering around I found the answer myself.

The error was produced by PHP intelliphense plugin of VS Code. It seems there is a problem with a version of the plugin I used. I downgraded my version one step and now it detects everything correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM