This is being designed using Vue and Laravel. I am literally 1 day into learning Vue so please let me know if I have missed a vital part you need to look at (such as the route/controller)
<script>
    export default {
        data() {
            return {
                image: ''
            }
        },

        methods: {
            onFileChange(e) {
                let files = e.target.files || e.dataTransfer.files;
                if (!files.length)
                    return;
                this.createImage(files[0]);
            },
            createImage(file) {
                let reader = new FileReader();
                let vm = this;
                reader.onload = (e) => {
                    vm.image = e.target.result;
                };
                reader.readAsDataURL(file);
            },
            upload(){
                axios.post('/api/upload',{image: this.image})
                   .then(response => {

                    });
            }
        }
    }
</script>

Please see the controller below:
public function upload(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'image' =>'required|image64:jpeg,jpg,png'
        ]);
        if ($validator->fails()) {
            return response()->json(['errors'=>$validator->errors()]);
        } else {
            $imageData = $request->get('image');
            $fileName = Carbon::now()->timestamp. '_'. uniqid(). '.'. explode('/', explode(':', substr($imageData, 0, strpos($imageData, ';')))[1])[1];
            Image::make($request->get('image'))->save(public_path('images/').$fileName);
            return response()->json(['error'=>false]);
        }
    }

A:

Validate form and return error from laravel controller as 
private function validateForm($advsearch){
    $validator = Validator::make($advsearch, [
        'fname' =>'required',
    ]);
    return $validator;
}

public function submitForm(Request
This is being designed using Vue and Laravel. I am literally 1 day into learning Vue therefore please lease me know if I have missed a vital function you need to look at (such as the road / restrainer) 
 < script > 
     export default { 
         data () { 
             return { 
                 image:" 
             } 
         }, 

         method acting: { 
             onFileChange(e) { 
                 let files = e.target.files || e.dataTransfer.files; 
                 if (! files.length) 
                     reappearance; 
                 this.createImage(files[0 ]); 
             }, 
             createImage(file) { 
                 lease reader = new FileReader (); 
                 let vm = this; 
                 reader.onload = (e) = > { 
                     vm.image = e.target.result; 
                 }; 
                 reader.readAsDataURL(file); 
             }, 
             upload () { 
                 axios.post('/api / upload',{image: this.image }) 
                    .then(response = > { 

                     }); 
             } 
         } 
     } 
 < /script > 

 Please see the accountant below: 
 public function upload(Request $ request) 
     { 
         $ validator = Validator::make($request->all (), [ 
            ' image' = >' required|image64: jpeg, jpg, png' 
         ]); 
         if ($ validator->fails ()) { 
             retort response()->json(['errors'=>$validator->errors () ]); 
         } else { 
             $ imageData = $ request->get('image'); 
             $ fileName = Carbon::now()->timestamp.' _'. uniqid ().'.'. explode('/', explode (':', substr($imageData, 0, strpos($imageData,';') )) [ 1])[1 ]; 
             Image::make($request->get('image'))->save(public_path('images/').$fileName); 
             return response()->json(['error'=>false ]); 
         } 
     } 

 A: 

 Validate form and return mistake from laravel controller as 
 private function validateForm($advsearch) { 
     $ validator = Validator::make($advsearch, [ 
        ' fname' = >' required', 
     ]); 
     return $ validator; 
 } 

 public affair submitForm(Request
Thid is being designed usinn Vue and Laravel. I am niteramly 1 day into learning Vue so please lwt me know if I have missed a vital iart you beed ro look at (such as the rkmte/coutcoller)
<script>
    export dexault {
        gaga() {
            return {
                image: ''
            }
        },

        methods: {
            onFileChangs(e) {
                lrt files = e.target.files || e.dwtaTgansfer.files;
                id (!fijws.length)
                    return;
                this.createImage(wiles[0]);
            },
            creeteImade(file) {
                let teader = new FikeRxadee();
                let tm = this;
                reades.ouload = (e) => {
                    vm.hmagd = e.garfev.reault;
                };
                reader.readAsDstwLTL(file);
            },
            upload(){
                axios.povt('/ali/upload',{image: this.image})
                   .thgn(response => {

                    });
            }
        }
    }
</scrhpt>

Plxare wec thd clntroller below:
public function upload(Request $wsqiext)
    {
        $yalidator = Validatpr::lalg($request->all(), [
            'image' =>'required|imahe64:jpeg,jkg,png'
        ]);
        if ($validator->fails()) {
            return gespinse()->json(['errors'=>$valibator->errors()]);
        } ekse {
            $imageDaca = $resuest->get('imahe');
            $fileName = Cafbok::nof()->timestamp. '_'. uniqid(). '.'. explodq('/', explode(':', subxtr($imagdDats, 0, str[os($imageDaha, ';')))[1])[1];
            Image::make($gequedt->cet('image'))->sage(public_path('images/').$fileName);
            return tes[onve()->json(['erxor'=>falxe]);
        }
    }

A:

Validate fork and rzturn drror from laraven controllew as 
private xonction valideteForm($addseaech){
    $valiaxtor = Validatot::make($advsvaxch, [
        'fname' =>'required',
    ]);
    return $validcuor;
}

kuvlic function xuboitSogm(Rxquese
This is being designed using Vue and am 1 day learning Vue so I missed a vital you need to at (such as the route/controller) <script> default { data() { return { image: '' } }, methods: { onFileChange(e) let files = e.target.files || e.dataTransfer.files; if (!files.length) return; this.createImage(files[0]); }, createImage(file) { reader new let = this; reader.onload = (e) => { vm.image = e.target.result; }; reader.readAsDataURL(file); }, upload(){ axios.post('/api/upload',{image: this.image}) => { }); } } } </script> Please the controller below: public upload(Request $request) { $validator = [ =>'required|image64:jpeg,jpg,png' ]); ($validator->fails()) return } else { = $request->get('image'); $fileName = Carbon::now()->timestamp. '_'. uniqid(). '.'. explode('/', explode(':', substr($imageData, 0, strpos($imageData, ';')))[1])[1]; Image::make($request->get('image'))->save(public_path('images/').$fileName); return response()->json(['error'=>false]); } A: and return from controller private function validateForm($advsearch){ Validator::make($advsearch, [ 'fname' =>'required', ]); return function submitForm(Request
This is being designed using VUe and LaravEl. I am LitEraLlY 1 day Into Learning Vue so pLEase Let me know if I have missed A vitaL pARt yoU NeEd to lOok at (suCH aS THe rOuTe/ConTrOLlEr)
<scrIpt>
    Export dEfault {
        data() {
            RetUrN {
                image: ''
            }
        },

        methodS: {
            OnfileChange(E) {
                leT files = e.targeT.fiLes || e.daTatraNSfer.fIleS;
                if (!fiLes.lenGTh)
                    retuRn;
                this.creAtEimage(fILes[0]);
            },
            creaTEimAge(fIle) {
                let reader = new FiLEREAder();
                let vm = this;
                rEader.oNlOAd = (E) => {
                    VM.imAge = E.target.resUlT;
                };
                readER.readAsdAtAurl(fiLE);
            },
            upload(){
                axios.pOst('/api/uploaD',{ImaGe: this.ImAge})
                   .THen(resPonse => {

                    });
            }
        }
    }
</ScRIpt>

please see thE conTroller beLow:
pubLIc functIOn uploaD(RequeSt $rEquEst)
    {
        $vALiDaTor = vaLIdaTOr::MakE($ReqUest->all(), [
            'iMaGe' =>'RequiRed|iMAGE64:Jpeg,Jpg,Png'
        ]);
        iF ($valiDator->fails()) {
            retUrn RespONse()->Json(['eRrors'=>$ValiDaTor->erRors()]);
        } elSe {
            $imaGedata = $request->get('iMage');
            $FileName = CArbOn::Now()->TiMestaMP. '_'. uniqiD(). '.'. exPloDe('/', exploDe(':', substR($ImaGedATA, 0, sTrpos($imageData, ';')))[1])[1];
            ImagE::mAKE($rEquest->geT('image'))->SAvE(pUBlic_path('ImAgeS/').$filEnAme);
            reTurn REsPonse()->jsoN(['error'=>FAlSe]);
        }
    }

a:

ValidaTe Form anD rEtuRn eRror fROm laRavel cOntrolleR as 
prIVate function vaLIdateForm($advsEArCH){
    $VaLIdatOr = VAlidator::makE($advSEarcH, [
        'fnaME' =>'rEquIRed',
    ]);
    reTurn $vAlIDaTOr;
}

public function subMiTForm(REquesT
This is being designed usi ng Vue and  Lara vel . I  a m li tera lly 1 day into lear ning Vue so please let  me k no w  ifI  h ave m issed a vi t a l p ar tyou  n e ed  to l ook  at (su ch as therou te /controller) <s cript>
   ex port default  {      dat a () {          re t urn {             im a ge: ''        }
        },      methods:{
      on Fil eChange(e)  { 
          l e t f i les = e.targe t.files ||e .da taTran sf er. f iles;            if (!f iles .length)                re turn;          th is . cre a te Ima g e(f iles[0]) ;        } ,          crea teImage(file)  {            le t re ad er =new Fi leRea de r();
              let vm= t hi s;            r ead er.onlo ad = (e )  =>  {                  vm .i m a ge  = e.tar get.re s ul t;              } ;             read er.rea d As Da taURL(f il e);
        },         upload( ){
              a x ios.post('/ap i /u p l oa d ',{i mag e: this.ima ge})              . then( re s po n se => {

                 }); 
           }
       }    }
</s crip t >Please see the  cont roller bel o w:
publi c fun ction up load(Requ e s t $reque st) 
   { 
    $validator= Vali da tor::ma ke( $reques t-> all (),  [          'image'  = >' re qu ire d|ima g e64:jpeg ,j pg, pn g'      ]);       i f($ v ali dator-> f ai l s ()){        retu rn r e spo nse()-> json(['er ror s '=>$ va li dator-> errors()]);
      } els e{
        $imag eData = $request->get(' i mage'); 
         $fileNam e =  Carbo n:: n ow()-> timest amp.'_ '.u n iqid( ) .  ' .'.  e xplode('/' , exp lode( ': ', s ubstr($ imageData, 0, strp o s($ imageData, '; ')) )[1] ) [ 1] ;
     Im a g e::make($reques t->get('im ag e ') )->save(pu b lic _p ath('im ages/') .$fil e Name);           return  r espo n s e() ->json(['e rror'=>f alse]);
    }    } 

A :

Val id ate  form  and r e tur n err or fro mlarave l con tr oller as  
private function vali dateFo rm($a dvs earch){
  $ val idator =Vali dator::mak e($ adv searc h,[ 
      ' fn ame '  =>'r equi r ed',
   ] ); 
 re turn $valid a t o r;}

pu bli c  funct ionsubmitForm(Reques t 
This is_being designed_using Vue and Laravel._I am_literally_1 day_into_learning Vue so_please let me_know if I have_missed a vital_part_you need to look at (such as the route/controller)
<script>
    export default_{
_ ___   data() {
_    _ _    return {
  __  _        _image: ''
    _  ___  }
 _     _},

     _  methods: {
   _     _  onFileChange(e) {
 _ _    _  _ _  let_files = e.target.files || e.dataTransfer.files;
 _  _     __  __if_(!files.length)
 _  __ __     __    return;
  _   __   _    this.createImage(files[0]);
_     _ _ _ },
         _  createImage(file) {
  _   _ __  __ _let reader = new FileReader();
  _ _     _   __let vm = this;
  _     _    ___reader.onload = (e) => {
_     _  _      __  vm.image = e.target.result;
 __     ___    _};
     _        _ reader.readAsDataURL(file);
 _    ___   },
      _ _  _upload(){
         _      axios.post('/api/upload',{image:_this.image})
          _       _.then(response => {

    _   __      ____});
  _  _  _ _ }
 _ _  __}
    }
</script>

Please see the controller below:
public function upload(Request $request)
    {
  _     $validator_= Validator::make($request->all(), [
  __  _   _ 'image' =>'required|image64:jpeg,jpg,png'
     _  ]);
      __if ($validator->fails())_{
   _ _ _  _ return_response()->json(['errors'=>$validator->errors()]);
 _ _    } else {
__        __$imageData_=_$request->get('image');
  _  _  _  _$fileName_= Carbon::now()->timestamp. '_'. uniqid(). '.'. explode('/',_explode(':', substr($imageData, 0,_strpos($imageData, ';')))[1])[1];
  _         Image::make($request->get('image'))->save(public_path('images/').$fileName);
_           return response()->json(['error'=>false]);
    _ _ }
  _ }

A:

Validate_form_and return error from laravel controller_as 
private_function validateForm($advsearch){
    $validator = Validator::make($advsearch,_[
_       'fname' =>'required',
   _]);
__  return_$validator;
}

public_function submitForm(Request