Skip to content
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

Don't works if model primaryKey is not id #32

Open
PrestaSafe opened this issue Sep 1, 2020 · 1 comment
Open

Don't works if model primaryKey is not id #32

PrestaSafe opened this issue Sep 1, 2020 · 1 comment

Comments

@PrestaSafe
Copy link

I've a model, Customer

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Customer extends Model
{
    protected $table = 'customer';
    protected $primaryKey = 'id_customer';
}

and i've this error:
Capture d’écran 2020-09-01 à 19 52 15
If i change to key (in the database) to id it's working !

I'm issing something ?

Thanks

@bobkosse
Copy link

bobkosse commented Apr 16, 2021

@PrestaSafe You can easy fix this by adding public $sort_attribute = 'id_customer'; to your table component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants