Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

[Bug] Problem during CRUD generation and relationships. #758

Closed pedja1982 closed 10 months ago

pedja1982 commented 10 months ago

Bug report

What I did

I created two models, "Category" and "Product." Products have a category ID in the table. When I generate CRUD (Create, Read, Update, Delete) operations in Devtools, I don't get a select option; instead, I get a regular input where I need to enter the category ID.

What I expected to happen

I expected the CRUD to generate a dropdown/select field instead of an input field.

What happened

CRUD works without a relationship. I manually enter the integer.

What I've already tried to fix it

I tried to find it in the documentation, but such a basic thing does not exist in the documentation. The documentation is quite poor.

Is it a bug in the latest version of Backpack?

After I run composer update backpack/crud the bug... is it still there? YES

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

### PHP VERSION:
PHP 8.1.4 (cli) (built: Mar 25 2022 14:25:19) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.4, Copyright (c) Zend Technologies

### LARAVEL VERSION:
10.33.0.0

### BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.2.2
backpack/crud: 6.3.0
backpack/devtools: 3.0.2
backpack/editable-columns: 3.0.2
backpack/generators: v4.0.2
backpack/pro: 2.0.18
backpack/theme-tabler: 1.1.1
welcome[bot] commented 10 months ago

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

-- Justin Case The Backpack Robot