MaverickChan

MaverickChan

Member Since 3 Years Ago

Experience Points 101,270
Experience Level 21

3,730 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 664
Lessons
Completed
Best Reply Awards 46
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

16 Jul
1 day ago
15 Jul
2 days ago

MaverickChan left a reply on Set Radio-button Value By Bool In Array

i think you should delete :value="true" , that means it will always be true.

input type="radio" itself has provide what you need.

MaverickChan left a reply on Vue Component Not Working

what does the console say?

14 Jul
3 days ago

MaverickChan left a reply on Unknown Custom Element

where is info layout?

13 Jul
4 days ago

MaverickChan left a reply on Unknown Custom Element

what is your compnents file structure?

are those files in same folder?

09 Jul
1 week ago

MaverickChan left a reply on Scroll To Anchor Between Components.

i think you can use some #id , in your component file , style part , not scoped.

08 Jul
1 week ago

MaverickChan left a reply on Insert Component Into DOM

<file-item v-for="file in files" :key="file.uuid" :file="file" @remove="remove" ref="file"></file-item>

you method remove need a file , but in the template , you didn't provide it.

maybe

<file-item v-for="file in files" :key="file.uuid" :file="file" @remove="remove(file)" ref="file"></file-item>

MaverickChan left a reply on Insert Component Into DOM

spelling issue?

props: ['files],
27 Jun
2 weeks ago

MaverickChan left a reply on Vue Components

use localstorage

MaverickChan left a reply on Vue Codes Break When Importing Script

@HJORTUR17 - that's the problem .

you should include the package in the master file along with app.js .

MaverickChan left a reply on Vue Codes Break When Importing Script

@HJORTUR17 - where did you put your import code ? in the master page or some single file component?

26 Jun
3 weeks ago

MaverickChan left a reply on Unicode Problem, Output Strange Words When In Chinese

@KANKAI - i guess it's your browser problem. Which browser are you using?

check the default decode option in the browser menu

25 Jun
3 weeks ago

MaverickChan left a reply on Export Buttons Won't Display On Datatable

@KISH77 - if you use push , you need to stack in your master page , see the doc

24 Jun
3 weeks ago

MaverickChan left a reply on Vue Calendar

do it yourself , really not that hard

23 Jun
3 weeks ago

MaverickChan left a reply on My Laravel Views Not Working

@MERIKI - sounds like you have a storage folder permission issue

cd into your laravel project folder,

sudo chomd -R storage 777

then run

php artisan cache:clear

php artisan view:clear


19 Jun
4 weeks ago

MaverickChan left a reply on Vue - Parse JSON String

@OLIVERBUSK - so you are doing it manually , not programaticaly

MaverickChan left a reply on Vue - Parse JSON String

you can't do it . you have un-equal width columns , so it will never fit the table.

in every td , you should give it a string (object is fine but it dosen't show the data you want).

in every row loop , it has an one element array , the array contains several objects from 1 to 3.

so , too many layers can't be done with 1 single loop.

16 Jun
1 month ago

MaverickChan left a reply on How To Display Data From Db Into Bar Chart

@LARA1 - no , you can't do foreach loop inside js.

you better learn some basics

MaverickChan left a reply on How To Display Data From Db Into Bar Chart

@LARA1 - normal laravel foreach loop

MaverickChan left a reply on How To Display Data From Db Into Bar Chart

@LARA1 - endpush should be at the end of the file

14 Jun
1 month ago

MaverickChan left a reply on How The Heck Do You Install Php Extensions Onto Windows.

@VINCEJ - in PHP 7.2 or above , you don't have to change extension setup in php.ini.

most extension Laravel need is already there.

check phpinfo();

13 Jun
1 month ago

MaverickChan left a reply on How To Remove Port In Laravel Aap In Localhost In Ubuntu 16.04

@INDERSEIN - if you are using php artisan serve to test , then try use the actual server.

LAMP is very easy to setup , apt install all the stuff you need , and some config , you are good to go.

MaverickChan left a reply on Data Is Not Coming From Db Into Chart

@INCRIDIBLE - you cannot insert js like this , it would never be used.

try stack , it is in the laravel document.

in the blade file

@push('scripts')
    <script src="/example.js"></script>
@endpush

in the main app.blade.php or other template blade file you use which contains the header part

<head>
//other stuff

@stack('scripts')

</head>

MaverickChan left a reply on VueJS File Upload, Not Working

@MANSHU - i am just giving you the idea , you might optimize your code in your way to make it work.

12 Jun
1 month ago

MaverickChan left a reply on Undefined Variable

$shoppingCart = ShoppingCart::where('user_id', Auth::user()->id)->get();
//spell wrong??

$shoppingCart = ShoppingCart::where('user_id', Auth::user()->id())->get();

also , this line should be inside auth check .

if you are not authenticated , you will never get the variable right.

MaverickChan left a reply on VueJS File Upload, Not Working

@MANSHU - ``` onFileChanged(e) {

let selectedFile = event.target.files[0]; // this is the file path
    this.form.imageUrl = selectedFile;

let reader = new FileReader();
            reader.readAsDataURL(selectedFile);
            reader.onload = e => {

    let src = e.target.result //this is the actual file         
               
         this.submitListing(file , src)

            };

}

submitListing(file,src) { const config = { headers: { "content-type": "multipart/form-data" } };

  let formData = new FormData();
  formData.append(src,file, config);
  axios.post("/listings", this.form, formData).then(response => {
    console.log(response.data);
  });
},

you should really use enctype in form , it is cleaner.

MaverickChan left a reply on VueJS File Upload, Not Working

@MANSHU - i think formdata.append has only the file path , you are missing the file itself

onFileChanged(e) {

    let selectedFile = event.target.files[0];
        this.form.imageUrl = selectedFile;

    let reader = new FileReader();
                reader.readAsDataURL(selectedFile);
                reader.onload = e => {
                   
            //do your things here ,send file to payload with path with your own settings

                };

}

MaverickChan left a reply on VueJS File Upload, Not Working

put multilpart/form-data in your form

11 Jun
1 month ago

MaverickChan left a reply on New CSS Only Updates When Hard-refreshing(ctrl + F5)

@OX - different browser has different behaviors. sometimes , when using webpack , compiled css or js will not take effect until a very hard refresh.

i am using MacOs as a dev machine , using laravel has the same issue. But if you switch to vue-cli , it has no problem.

i don't know why either , tried everything you did , now , just hard refresh ...... i am getting use to it

MaverickChan left a reply on Model Binding On Inputs

@TWG_ - first , you don't need name and id of input.

second, you are binding all checkbox as one , so change them to different variables.

wrong:
<input id="item1" name="items[]" value="Item 1" type="checkbox" v-model="fields.items" />
<input id="item2" name="items[]" value="Item 2" type="checkbox" v-model="fields.items" />
<input id="item3" name="items[]" value="Item 3" type="checkbox" v-model="fields.items" />
<input id="item4" name="items[]" value="Item 4" type="checkbox" v-model="fields.items" />
right:
<input  value="Item 1" type="checkbox" v-model="fields.items1" />
<input  value="Item 2" type="checkbox" v-model="fields.items2" />
<input  value="Item 3" type="checkbox" v-model="fields.items3" />
<input  value="Item 4" type="checkbox" v-model="fields.items4" />
10 Jun
1 month ago

MaverickChan left a reply on Passing Vue Arrays To Laravel

@THEUNFORGIVEN - thanks buddy.

you will find Vue is the best .

happy coding

MaverickChan left a reply on Passing Vue Arrays To Laravel

@THEUNFORGIVEN - i just notice you are a Level 50 user... ok , i assume you use jquery a lot before.

so , here is my advice , in vue component , you don't have to do formData binding if you don't have a upload file.

remember , v-model is your friend.

in your data, declare a variable (could be an object or an array) , bind it with form input.

use a computed property to assemble it into an object(like your example)

use axios.post to send to laravel

in your controller , do the saving method.

06 Jun
1 month ago

MaverickChan left a reply on How To Pass Only Form Data Not The Html From One Component To Another On Submit

@SAURABH.KACKAR - as i said before , you don't have to pass data to confirmation component.

and your local server cannot be seen here.

why not show some code?

MaverickChan left a reply on How To Pass Only Form Data Not The Html From One Component To Another On Submit

you should not redirect route to confirmation component after fill in the form

because , confirmation is just a gate or a popup message , it should not contain any data .

you can call a confirmation component inside your brandselection data , make a choice , if yes , redirect, if not , do nothing .

this is should be very easy .

04 Jun
1 month ago

MaverickChan left a reply on Update Laravel

if you are using a MacOs , just install the zip extension for your php

03 Jun
1 month ago

MaverickChan left a reply on Design Patterns

video please

02 Jun
1 month ago

MaverickChan left a reply on How Can I Access The Data Properties In A Vue Component

@MADMAKS - please show me the whole code (if it is ok) including the props part and methods part

01 Jun
1 month ago

MaverickChan left a reply on How Can I Access The Data Properties In A Vue Component

how do you get the value of slugOfVideo?? which method is taking care of it?

30 May
1 month ago

MaverickChan left a reply on Component Props And Url

@MOE - show me your routes/web.php , and some controller

MaverickChan left a reply on Component Props And Url

@MOE - show us what route('post.store') is really like .... please

MaverickChan left a reply on Component Props And Url

@MOE - try

<edit-post-modal :categories="{{ $categories }}" :post="{{ $post }}" :action_path="{{ route('post.store') }}">

MaverickChan left a reply on Vue Component Is Not Displaying

@WEBFABRICANT - i mean , post the code here....

MaverickChan left a reply on Component Props And Url

where is your close tag?

</edit-post-modal>
29 May
1 month ago

MaverickChan left a reply on Vue Component Is Not Displaying

@WEBFABRICANT - post your app.blade.php file in layouts folder

MaverickChan left a reply on Vue Component Is Not Displaying

if you are using default laravel auth layout blade file , id#app won't be a problem

but , did you run

npm run dev

you need to compile down all the components.

also , do a hard refresh of your browser.

25 May
1 month ago

MaverickChan left a reply on Vue App Error In Laravel

@CLEOPATRA - instead of requiring components , just import them.

24 May
1 month ago

MaverickChan left a reply on Components Within Components

something like a spa

you can use vue-router

or , component in component is ok.