Your error means that you're trying to insert a value into the column "usuario_idusuario" in the "empleado" table that does not exist in the column "id" in the "usuario" table. Without seeing the query that's being run and the table values, I can't give you any more info. You need...
According to your var dump $proveedores is an array with 2 elements which represent 2 rows in your table. The query that you issued seems to have returned 2 rows as a result to access them you should do something like the following $id1 = $proveedores[0]['id']; $id2 = $proveedores[1]['id']; ...
I took a punt and the answer was easier than I anticipated: public function featuredProfiles() { return $this->profiles()->where('featured', 'Yes'); } The where is added as part of the query on the joined table....
I have solved this issue my self $user = Model::factory('User')->find_many(); // Find the posts associated with the user //$posts = $user->posts()->find_many(); I looped through $user and passed each user id to $user->posts()->find_one(); sudo code is here: foreach($user as $usr) { $posts = $user->posts()->find_one($usr->Id); } ...