We can use $this->set(compact()) to pass multiple parameters to access into the view file.
BY Best Interview Question ON 13 Jan 2019

Example

$this->set(compact('variable1','variable2','variable3'));

Suggest An Answer