mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #15860 from binaryfire/configurable-export-routes
Configurable utility route prefix
This commit is contained in:
@@ -4,10 +4,15 @@ use Filament\Actions\Exports\Http\Controllers\DownloadExport;
|
||||
use Filament\Actions\Imports\Http\Controllers\DownloadImportFailureCsv;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/filament/exports/{export}/download', DownloadExport::class)
|
||||
->name('filament.exports.download')
|
||||
->middleware('filament.actions');
|
||||
$prefix = config('filament.system_route_prefix', 'filament');
|
||||
|
||||
Route::get('/filament/imports/{import}/failed-rows/download', DownloadImportFailureCsv::class)
|
||||
->name('filament.imports.failed-rows.download')
|
||||
->middleware('filament.actions');
|
||||
Route::middleware('filament.actions')
|
||||
->name('filament.')
|
||||
->prefix($prefix)
|
||||
->group(function () {
|
||||
Route::get('/exports/{export}/download', DownloadExport::class)
|
||||
->name('exports.download');
|
||||
|
||||
Route::get('/imports/{import}/failed-rows/download', DownloadImportFailureCsv::class)
|
||||
->name('imports.failed-rows.download');
|
||||
});
|
||||
|
||||
@@ -86,4 +86,16 @@ return [
|
||||
|
||||
'livewire_loading_delay' => 'default',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| System Route Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the prefix used for the system routes that Filament registers,
|
||||
| such as the routes for downloading exports and failed import rows.
|
||||
|
|
||||
*/
|
||||
|
||||
'system_route_prefix' => 'filament',
|
||||
|
||||
];
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
<span
|
||||
x-text="
|
||||
window.pluralize(@js(__('filament-tables::table.selection_indicator.selected_count')), {{ $selectedRecordsPropertyName }}.length, {
|
||||
count: new Intl.NumberFormat(@js(str_replace('_', '-', $locale))).format({{ $selectedRecordsPropertyName }}.length),
|
||||
count: new Intl.NumberFormat(@js(str_replace('_', '-', $locale))).format(
|
||||
{{ $selectedRecordsPropertyName }}.length,
|
||||
),
|
||||
})
|
||||
"
|
||||
class="text-sm font-medium leading-6 text-gray-700 dark:text-gray-200"
|
||||
|
||||
Reference in New Issue
Block a user