Skip to content

LaravelDaily/Laravel-Vue-API-File-Upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Demo Project: Laravel + Vue.js File Upload

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •