I'm using last version of PhpStorm v2019.2. In this version take Undefined Variable
for all passed variable to view from controller
@foreach( $specifications as $specification )
@php
$type_spec = $specification->types->where('id',$property->type_id);
@endphp
@endforeach
or other error picture in PhpStorm, we passed $property
from controller and code work correctly
@var
and declare (so IDE knows that such variable indeed exists and what type that is/what methods can be called). IDE does not provide any special support for Laravel framework (it's done by 3rd party plugin), but IDE provides plugin for Blade files. – Pomfret{{ }}
and just take error in@php
– Vacillatory@php
as if it would be normal valid<?php ... ?>
block. The stuff inside{{ }}
can be anything, so it's not checked that much (as variables may be coming from anywhere). – Pomfret