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

Improve performance: make service provider deferred #350

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions src/Providers/FastExcelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@

namespace Rap2hpoutre\FastExcel\Providers;

use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;

class FastExcelServiceProvider extends ServiceProvider
class FastExcelServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}

/**
* Register any application services.
*
Expand All @@ -33,4 +24,16 @@ public function register()
return new \Rap2hpoutre\FastExcel\FastExcel($data);
});
}

/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides(): array
{
return [
'fastexcel',
];
}
}