view-components / grids

MIT License
86 stars 17 forks source link

Call to undefined method ViewComponents\Grids\ServiceProvider::isDeferred() #22

Open amraei opened 8 years ago

amraei commented 8 years ago

I'm installing Grids on Laravel 5.2. When I add service provider to app.php, I get this error: Call to undefined method ViewComponents\Grids\ServiceProvider::isDeferred()

I looked around and found view-components/grids/src/ServiceProvider.php is declaring a ServiceProvider class. I think it should has another name like GridsServiceProvider and extend Illuminate\Support\ServiceProvider.

Nayjest commented 8 years ago

Hi! You don't need to add any service-providers from view-components package to Laravel's app.php, that classes are used internally by view-components.

The only thing you need for using grids with Laravel is https://github.com/view-components/eloquent-data-processing.

Just include this package using composer to be able to use EloquentDataProvider with grids.

Nayjest commented 8 years ago

Added PhpDoc comment for Laravel users here to avoid such mistakes. Hope that will help.

Give me know if you will have another issues.

amraei commented 8 years ago

I also suggest to add it to installation guide. Specially for those users who are using nayjest/grids, it's a confusion.

Nayjest commented 8 years ago

reopened: @todo upd. installation guide