RecentDash
This commit is contained in:
@@ -162,12 +162,28 @@ class DashboardController extends Controller
|
||||
Created at : 08 July 2024
|
||||
Use : To Get Excel.
|
||||
*/
|
||||
// public function exportRecentTransactions(Request $request)
|
||||
// {
|
||||
// try {
|
||||
// if ($request->has('all_id')) {
|
||||
// $recentTransaction = Subscriptions::with('subscription')->get()->toArray();
|
||||
// // return $recentTransaction;
|
||||
// return Excel::download(new DashboardExportUser($recentTransaction), 'recent_transactions.xlsx');
|
||||
// }
|
||||
|
||||
// $ids = $request->input('selected_id');
|
||||
// $fileName = 'selected_customer_transaction_data.xlsx';
|
||||
// return Excel::download(new DashboardSelectedExportUser($ids), $fileName);
|
||||
// } catch (\Exception $e) {
|
||||
// return response()->json(['error' => 'Export failed. Something went wrong.'], 500);
|
||||
// }
|
||||
// }
|
||||
|
||||
public function exportRecentTransactions(Request $request)
|
||||
{
|
||||
try {
|
||||
if ($request->has('all_id')) {
|
||||
$recentTransaction = Subscriptions::with('subscription')->get()->toArray();
|
||||
// return $recentTransaction;
|
||||
return Excel::download(new DashboardExportUser($recentTransaction), 'recent_transactions.xlsx');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user