Trying to get property 'id' of non-object

Trying to get property 'id' of non-object