-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How To Set Custom Primary Key for CRUD #179
Comments
Hmm. This has been fixed a long time ago. What version of Laravel and Backpack\CRUD are you using? |
A composer update might fix it. |
I use laravel 5.3 and Backpack v 3.1.17 |
I Update Laravel and Backpack\CRUD to last version its not work for me token is : "Gp8CyJ015_FL4J3C" token is: "83869054625463495" |
Oh. You should't use a string as primary key. It's bad practice. The search is much much slower so it defeats the purpose. |
tnx i will change database primary key to id |
Later update: it IS possible to use strings as primary keys. Just make sure you define |
class UserPayment extends Model
{
use CrudTrait;
.....
}
I Create Model Like This But When need Edit Curd
The Link is generated like this:
http://localhost:8000/adminpanel/user-payment//edit
primary key is token not id
how can i fix this problem?
The text was updated successfully, but these errors were encountered: