Laravel-excel: [QUESTION] Use a View and a Query Together?

Created on 9 Jun 2020  路  3Comments  路  Source: Maatwebsite/Laravel-Excel

Prerequisites

Versions

  • PHP version: 7.3.18
  • Laravel version: 7.14.1
  • Package version: 3.1.19

Description

Is it possible to export with multiple concerns/sources? Before I was building out pretty complicated exports on 2.1 where the user could pass data to the controller, which would pass queried variables to a view. Seems now I can only do View or Query?

question

All 3 comments

I'm not sure I understand the problem? You can still pass those queries variables to the View in 3.x

Thanks, got that figured out, wasn't sure since the docs are so sparse and only the From Query page mentioned passing in variables.

Now just trying to figure out how to get styling to work in the view. Most of the styles from 2.x are missing. Not sure how to use phpspreadsheet styling in a blade file. Googling around now...

Every concern allows variables to be passed in, it's not something exclusive, just simple PHP class logic :) If you have any additions to the documentation, feel free to PR it. You can easily PR the docs by clicking the "Help us improve this page".

Not 100% sure, but I think I've PR'd all view styling options we had before to PhpSpreadsheet. You can find the list of css properties being parsed here: https://github.com/PHPOffice/PhpSpreadsheet/blob/master/src/PhpSpreadsheet/Reader/Html.php#L746

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucatamtam picture lucatamtam  路  3Comments

contifico picture contifico  路  3Comments

gamevnlc picture gamevnlc  路  3Comments

daraghoshea picture daraghoshea  路  3Comments

muhghazaliakbar picture muhghazaliakbar  路  3Comments