thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Relationship "Not result found" #5527

Closed benja2111 closed 2 years ago

benja2111 commented 2 years ago

Laravel version

8.75

PHP version

8.1

Voyager version

1.5

Database

MySQL

Description

I'm trying to create a relationship via Voyager but it returns no results. It doesn't matter what relationship I choose or what table I'm trying to put it on.

Steps to reproduce

Here are the steps I did :

  1. Create un new Laravel project
  2. Integer voyager to my new Laravel project (composer require tcg/voyager)
  3. Set the .env files for add the name of my existant bdd
  4. Create a admin account for voyager

Now when I go to Voyager, I create a BREAD to my works and clients table. Then I want to add a belongs to link to my post table but no it finds no result.

Expected behavior

I would like to be able to display the name of the client thanks to his id.

Screenshots

Capture d’écran 2022-02-13 132132

Additional context

No response

emptynick commented 2 years ago

I think this might be a naming issues with your clients table/model. Your model is called Clients (plural). What is your table called? What do you get when you run dd(CLients::all()); ? A result or an error?

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.