update 1.0.8.0
Commits for version update
This commit is contained in:
19
vendor/maatwebsite/excel/docs/blade/vars.md
vendored
Normal file
19
vendor/maatwebsite/excel/docs/blade/vars.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# Passing variables to the view
|
||||
|
||||
### As parameter
|
||||
|
||||
We can pass variables to the view by using the second parameter inside the `loadView()` method.
|
||||
|
||||
$sheet->loadView('view', array('key' => 'value'));
|
||||
|
||||
### With with()
|
||||
|
||||
Alternatively you can use the `with()` method which works the same as with Laravel views.
|
||||
|
||||
// Using normal with()
|
||||
$sheet->loadView('view')
|
||||
->with('key', 'value');
|
||||
|
||||
// using dynamic with()
|
||||
$sheet->loadView('view')
|
||||
->withKey('value');
|
||||
Reference in New Issue
Block a user