!Jaeger!
preview file after upload
To create a wizard in Laravel where the user uploads a CSV file in the first step and views the data in a table on the same step, you can handle it using a combination of a file upload form, validation, and a session to temporarily store the file's contents. In the form for Step 1, use a file input to allow the user to upload the CSV file. On submission, validate and process the file in the controller by using fgetcsv() or a library like Maatwebsite Laravel Excel to read the CSV data into an array. Store the processed data in a session or pass it back to the view directly. Then, render the table dynamically in the same view by iterating over the array containing the CSV data. For example, in your controller, after processing the file, return the same view with the CSV data (e.g., return view('wizard.step1', compact('csvData'))), and in your Blade template, check if csvData exists to display the table dynamically. This approach keeps the user on the same step and shows the uploaded file's data immediately.
6 replies
Cookie on ssr
It seems like you're facing an issue with accessing cookies on the server-side in a Nuxt.js composable. The reason useCookie() might not be working on the server side is that cookies are typically available only in the request headers when the server processes a request. Nuxt's useCookie works fine on the client-side, but on the server side, you'll need to access cookies a bit differently.
9 replies
Frontend page not get header in filament
To add a header section in your Filament product page, you can either use the header() method in your page class, where you return a string like 'product page' to display as the page title or you can define a custom header directly in your blade template using @section('header'), which allows you to add custom HTML content, like a <h1>tag or additional styles
5 replies