Relationship checker for laravel