Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Http\Request;
- Use Excel;
- class DemoController extends Controller
- {
- public $name;
- function index(){
- $this->name='gunawan';
- Excel::create('Contoh', function($excel) {
- $excel->sheet('hal 1', function($sheet ) {
- //$sheet->loadView('view', array('key' => 'value'));
- $sheet->loadView('excel.exp1', array('name'=>$this->name) );
- });
- })->export('xls');;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement