---
title: "Discussion on \"Laravel Tip: How to avoid error when no relation exists\" | Hashnode"
description: "Discussion on \"Laravel Tip: How to avoid error when no relation exists\". Laravel is the most famous PHP framework and it is used widely.\nAs a Laravel Developer you must have used Eloquent and Eager/Lazy loading to reduce the query time and for optimization.\nSometimes you try to call a relationship that does not exist and ..."
url: "https://hashnode.com/posts/laravel-tip-how-to-avoid-error-when-no-relation-exists/60df43f603707d644a4fed98"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Laravel Tip: How to avoid error when no relation exists](https://mustafanatiq.hashnode.dev/laravel-tip-how-to-avoid-error-when-no-relation-exists?utm_source=hashnode&utm_medium=feed)

Laravel is the most famous PHP framework and it is used widely. As a Laravel Developer you must have used Eloquent and Eager/Lazy loading to reduce the query time and for optimization. Sometimes you try to call a relationship that does not exist and ...

Jul 2, 2021 · 1 min read · mustafanatiq.hashnode.dev  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)
-   [#phpstorm](https://hashnode.com/tag/phpstorm)

## Written by

[Muhammad Mustafa](https://hashnode.com/@MustafaNatiq)

@MustafaNatiq

  
[View profile](https://hashnode.com/@MustafaNatiq)

Contribute to open source community

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
