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

get error "ErrorException" when use "$val, ObjectDataRow $row" in setCallback #180

Open
nekooee opened this issue Oct 24, 2017 · 2 comments

Comments

@nekooee
Copy link

nekooee commented Oct 24, 2017

hi
I use $val, ObjectDataRow $row for get row id and delete or edit row. but get this error:
(1/1) ErrorException
Argument 2 passed to App\Http\Controllers\Front\IndexController::App\Http\Controllers\Front{closure}() must be an instance of App\Http\Controllers\Front\ObjectDataRow, instance of Nayjest\Grids\EloquentDataRow given

please help me.
@wdog
Copy link
Contributor

wdog commented Oct 24, 2017

remember to

use Nayjest\Grids\ObjectDataRow;

then

->setCallback(function ($val, ObjectDataRow $dr) {
         // value of the cell
        // $val 

         // all data row
         // $data= $dr->getSrc(); 

        // row id
         $id= $dr->getId();
         return $id
})

@nekooee
Copy link
Author

nekooee commented Oct 24, 2017

thank you. my problem sloved :)

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