Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Based on SQL error you are missing pivot table. I do not think it is prefix issue. Check your schema

Last updated 2 years ago.
0
Solution

Nope, the schema is fine. Taylors comment in the issue #1590 is the solution. You simply have to add the name with the prefix like:

public function endpoints(){ return $this->belongsToMany('Endpoint', 'guestservice_endpoint_guest'); }

Source: https://github.com/laravel/laravel/issues/1590

Last updated 2 years ago.
0

well, this is not really prefix issue. You want to use table that does not confirm to laravel's naming conventions. And this is very well documented here http://laravel.com/docs/eloquent#many-to-many

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

bart bart Joined 24 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.