HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/topswtwmobile.komma.pro/vendor/maatwebsite/excel/docs/blade/vars.md
# 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');