Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88030

Laravel URL in Excel Spreadsheet redirects to home page

$
0
0

I am using the an auth-library https://github.com/jeremykenedy/laravel-auth . I inserted some internal URL into an excel using phpspreadsheet. The URL uses GET request to return a view with some data. When clicking the hyperlink from the excel spreadsheet, then link prompts login and redirects to the home page. If the url is copied and pasted into the web browser there is no issue.

Writing To Excel

$url = 'http://url.com/getTrackDocumentsUser/'.$track->track_id; $spreadsheet->setCellValue($uploadDocUrlColumn.$excelRowNum, $url); $spreadsheet->getHyperlink($uploadDocUrlColumn.$excelRowNum)->setUrl(strip_tags($url));

Web Route Route::get('getTrackDocumentsUser/{id}', 'TrackController@trackDocumentsIndexUser')->name('getTrackDocumentsUser');

I expect the newly open tab to redirect to the proper view instead of the homepage.


Viewing all articles
Browse latest Browse all 88030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>