$File = fopen('php://temp', 'w');
fputs($File, chr(0xEF) . chr(0xBB) . chr(0xBF)); // BOM
fputcsv($File, ['Ссылка 1', 'Сылка2'],";");
fclose($File);
header("Content-type: text/csv");
header('Content-Disposition: attachment; filename="file.csv"');
header("Pragma: no-cache");
header("Expires: 0");
echo $File;
Должно быть так route('admin.category.edit',['category' => $category->id])
а было route('admin.category.edit',['id' => $category->id])