I'm working on my Laravel project, and have a problem with many-to-many relationship
it throws back the following error:
BadMethodCallException Call to undefined method App\Models\Article::categories()
although I have defined the relationship as categories in my Article model, Laravel solution is:
Bad Method Call Did you mean App\Models\Article::categories()?
Please help me to find out which part of code could lead to this issue
Article Model:
Article Controller:
Category Controller: