I have a simple shopping site where people can order photographic prints. The available size for each photo is stored in a separate table and the two are joined, along with the price, in a pivot table.
When the user chooses a size and adds the photo to the basket, the following is called in my controller:
// grab photo information $photo = Photo::find($request->id); // extract price from the database $row = DB::table('photo_size') ->where('photo_id', $request->input('id')) ->where('size_id', $request->input('size')) ->first(); // grab size name for use in the basket item $size = Size::find($row->size_id);
In every browser except Internet Explorer, this works perfectly. But in IE, it throws an error in the last line:
'Trying to get property of non-object'
What is causing this error in IE only?
On further investigation I think the error may be caused by Vue.js. I pass the photo information the controller using Vue, but for some reason IE11 is not binding the data, so the controller is being passed null information. Any ideas how to fix that?