Skip to content
← Back to projects

Laravel Vue API File Upload

Demo Project: Laravel + Vue.js File Upload

#Laravel-Vue-API-File-Upload

Repository for the article Laravel API: How to Upload File from Vue.js

There are two pages:

  • One example is for uploading avatar during User registration (with Laravel default)
  • Another example is uploading thumbnail for new article (with Spatie Medialibrary)

Laravel File Upload Vue.js screenshot


API for the Article example was generated with our QuickAdminPanel generator: QuickAdminPanel.com

Read more: New API Generator 2019 – now with Laravel Passport!


#How to use

#Back-end Code: Laravel

  • Clone the repository with git clone
  • Copy .env.example file to .env and edit database credentials there
  • Run composer install
  • Run php artisan key:generate
  • Run php artisan migrate --seed (it has some seeded data for your testing)
  • Add your domain name into .env file's APP_URL variable

#Front-end Code: Vue.js

  • After cloning the repository, add URL of the back-end into src/main.js file
  • Run npm install
  • Run npm run serve and enter the URL shown in the Terminal.

#License

Basically, feel free to use and re-use any way you want.


#More from our LaravelDaily Team

New version available.