You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
639 B
28 lines
639 B
1 year ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Report;
|
||
|
|
||
|
use App\Models\Customer;
|
||
|
use Illuminate\Http\Request;
|
||
|
use App\Exports\CustomerExport;
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use Maatwebsite\Excel\Facades\Excel;
|
||
|
|
||
|
class ReportCustomerController extends Controller
|
||
|
{
|
||
|
public function index()
|
||
|
{
|
||
|
$data = [
|
||
|
'customers' => Customer::get(),
|
||
|
'active' => 'menu-ReportCustomer'
|
||
|
];
|
||
|
return view('dashboard.Master_Data.Report.Customer.index', $data);
|
||
|
}
|
||
|
|
||
|
public function export()
|
||
|
{
|
||
|
// dd('export');
|
||
|
return Excel::download(new CustomerExport, 'Report_Customer.xlsx');
|
||
|
}
|
||
|
}
|