Shafiya_Ariff's avatar
  • Popularity: 0 points
  • Activity: 7 points
  • Pronoun: They/Them/Theirs
  • Joined: 7 months ago
  • Last Login: 7 months ago
  • Profile viewed: 420 times
  • Has watched: 0 videos
Contact Shafiya_Ariff
  1184 views · 6 months ago

![](https:/ /

Recently I was faced with a task to post data from a .csv file to an external REST API. I’m just going to log in to this article about what I did to get the job done.

Let’s start by creating a template for uploading the file. For this article’s sake, lets make the changes in the dashboard.blade.php file.


<form method="post" enctype="multipart/form-data"> @csrf <div class="custom-file"> <input type="file" accept=".csv" name="excel" class="custom-file-input" id="customFile" /> <label class="custom-file-label" for="customFile">Choose file</label > </div> <div> <button type="submit" class="btn btn-primary btn-sm" style="margin-top: 10px" >Submit> </div>



**Note** : Don’t forget to add enctype=”multipart/form-data”!

![](https:/ /cdn.files...