work on self joining has clause on belongsToMany relationships.
Fix variable name.
Make morph integer unsigned.