[Vuejs]-"Undefined property: Illuminate\View\Engines\CompilerEngine::$

0👍

following code is calling property of $this by value of variable $award
($this->$award)
means that if $award does contain string matching property of $this, you should get value of that property.

Instead, $award contains something that looks like a stringified json object

{"id":1,"title":"abddad","description":"abddad.","created_at":"2019-06-27 22:25:18","updated_at":"2019-06-27 22:25:18"}

however $this does not contain such variable.

try following code on line 5, should work

@if (count($award) === 2)

0👍

I solved like this

@if (($award->id) % 2 == "0") 

Thanks for the help!

Leave a comment