tidy up route and put reports route inside report.php

This commit is contained in:
edmondlang
2022-03-13 22:06:11 +08:00
parent 5b1f4eff0d
commit a1a9ab76bb
2 changed files with 14 additions and 4 deletions
+1 -4
View File
@@ -54,10 +54,7 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function
require __DIR__ . '/announcement.php';
Route::get('/report/customer/{marking}/{from?}/{to?}', 'Reports\MonthlyReportController@customerReport')->name('report.customer');
Route::get('/report/sales/{from?}/{to?}', 'Reports\MonthlyReportController@salesReport')->name('report.sales');
Route::get('/report/profit/{model}/{value}/{from?}/{to?}', 'Reports\MonthlyReportController@profitModelReport')->name('report.profit');
Route::get('/report/service', 'Reports\MonthlyReportController@serviceReport')->name('report.service');
require __DIR__ . '/report.php';
});
+13
View File
@@ -0,0 +1,13 @@
<?php
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'report', 'as' => 'report.', 'namespace' => 'Reports'], function () {
Route::get('/customer/{marking}/{from?}/{to?}', 'MonthlyReportController@customerReport')->name('customer');
Route::get('/sales/{from?}/{to?}', 'MonthlyReportController@salesReport')->name('sales');
Route::get('/profit/{model}/{value}/{from?}/{to?}', 'MonthlyReportController@profitModelReport')->name('profit');
Route::get('/service', 'MonthlyReportController@serviceReport')->name('service');
});