/** * Bind Excel class * @return void */ protected function bindExcel() { // Bind the Excel class and inject its dependencies $this->app['excel'] = $this->app->share(function ($app) { $excel = new Excel($app['phpexcel'], $app['excel.reader'], $app['excel.writer'], $app['excel.parsers.view']); $excel->registerFilters($app['config']->get('excel.filters', array())); return $excel; }); }
/** * Set filters * * @param array $filters * @return \Excel * @static */ public static function registerFilters($filters = array()) { return \Maatwebsite\Excel\Excel::registerFilters($filters); }