-1

I want to create trait in Laravel with name Searchable, but PhpStorm do not identified the file as .php but as simple text. If I rename the file into Searchables for example, it works fine.

Is Searchable restricted keyword or what?

enter image description here

enter image description here

It's not Laravel's problem, other projects do the same. So I guess it's in PhpStorm.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Viktor Sydorenko
  • 663
  • 1
  • 12
  • 20

1 Answers1

1

Is Searchable restricted keyword or what?

Absolutely not.

So I guess it's in PhpStorm

You are correct ... But it's user misconfiguration and not a bug.

Try to remember how you have created that file...

In any case:

  • Settings/Preferences | Editor | File Types
  • Locate Text entry in top list, select it
  • Now locate and remove unwanted pattern in bottom list -- will be something like Searchable or Searchable.php.

You can find more detailed explanation of how it possibly (most likely) has happened here: https://stackoverflow.com/a/21281563/783119

LazyOne
  • 158,824
  • 45
  • 388
  • 391