Skip to content

Allow to add custom button actions (or disable already existing ones). #18

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

Merged
merged 1 commit into from
Apr 20, 2017
Merged

Allow to add custom button actions (or disable already existing ones). #18

merged 1 commit into from
Apr 20, 2017

Conversation

underdpt
Copy link
Contributor

@underdpt underdpt commented Apr 19, 2017

This will allow to create custom button actions, or disable existing ones so they cannot be called by creating a custom request

@yajra
Copy link
Owner

yajra commented Apr 20, 2017

Released on v1.3.0 🚀 !

BTW, if you can. Please also send a PR for the official docs @ https://github.com/yajra/laravel-datatables-docs. Thanks!

@underdpt
Copy link
Contributor Author

Done:

yajra/laravel-datatables-docs#2

Please be aware English isn't my native language, so a lot of errors are to be expected.

@yajra
Copy link
Owner

yajra commented Apr 20, 2017

Need some CS adjustment and your PR and is good to go.

I'm not fluent on English too so I think we should let other users to correct us if we have some grammar issue (lol). ^_^

@Waguilar33
Copy link

It might be just me but I couldn't for the life of me get this to work.

@yajra
Copy link
Owner

yajra commented Sep 9, 2017

@Waguilar33 on your custom buttons script, you just need to append an action column on your request that matches the method on your service class.

Example request url:
site.com\data?action=customAction&draw=1&...

class UsersDT extends DataTable
{
    public function customAction() {
        return 'My Action';
    }
}

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

Successfully merging this pull request may close these issues.

3 participants