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

Helper function public_path (laravel vs. laravel-datatables) #1377

Closed
lukashroch opened this issue Sep 9, 2017 · 6 comments
Closed

Helper function public_path (laravel vs. laravel-datatables) #1377

lukashroch opened this issue Sep 9, 2017 · 6 comments
Labels

Comments

@lukashroch
Copy link

I have noticed that laravel-datatables is declaring custom function "public_path" instead of internal laravel one. As a result, laravel-datatables one is used instead of internal one, which might cause some issues.

E.g. I'm binding different public path in the beginning of my app, as my server folder structure differs from original laravel. Obviously, binding won't work in this case, as laravel-datatables "public_path" don't respect laravel built-in path architecture.

So my question is, if there is any particular reason not to use internal one? Searching through the code, it is only used once in buttons plugins, which could be handled by built-in version.

System details

  • Operating System
  • PHP Version 7.1
  • Laravel Version 5.5.3
  • Laravel-Datatables Version 8.0.2
@yajra
Copy link
Owner

yajra commented Sep 9, 2017

I think it was previously added for Lumen support.

@lukashroch
Copy link
Author

Well, would it be possible to follow laravel pattern so if you bind different path to project needs, all other packages follow?
In current state, laravel datatables package brakes this functionality if this helper is loaded instead of built in one.

@yajra
Copy link
Owner

yajra commented Sep 10, 2017

Will review this when I got the chance. I think it was added since Laravel 5.0 and have not been updated since then. If you can, please do not hesitate to submit a PR. Thanks!

@lukashroch
Copy link
Author

Yep, will try to look at it, as well. But I haven't used Lumen much so I'm not sure why is it needed there.

Thinking about it, problem appeared after laravel 5.4 to 5.5 and laravel datatables 7.0 to 8.0 upgrade. So there had to be some change loading as package function started to load earlier than framework one.

@yajra
Copy link
Owner

yajra commented Sep 12, 2017

Fixed on v8.0.3, kindly update and confirm. Thanks!

@yajra yajra added bug and removed for review labels Sep 12, 2017
@lukashroch
Copy link
Author

Works great, thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants