MaverickChan

MaverickChan

Member Since 3 Years Ago

Experience Points
115,340
Total
Experience

4,660 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
766
Lessons
Completed
Best Reply Awards
50
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.

Level 24
115,340 XP
Jan
16
2 days ago
Activity icon

Replied to Getting Route To Work With Vue

@pllaguno here is the Vue Doc explained everything . Vue's doc is your best friend

props

Jan
15
3 days ago
Activity icon

Awarded Best Reply on Getting Route To Work With Vue

<filter-bar :route="route"></filter-bar>

you don't need this

Activity icon

Replied to Getting Route To Work With Vue

<button class="btn btn-secondary" @click.prevent="createNew(route)">Nuevo Expediente</button>

no this here too

remember in template expressions don't need this

Jan
14
4 days ago
Activity icon

Replied to Getting Route To Work With Vue

<filter-bar :route="route"></filter-bar>

you don't need this

Jan
11
1 week ago
Activity icon

Replied to Access Props Inside Computed

try array push

Jan
06
1 week ago
Activity icon

Replied to Close On Click Outside Element In Vue

you can't control click once or twice , in your case maybe ok , but , if you click somewhere important after onblur, that will be no time left for you to cancel

Activity icon

Replied to Close On Click Outside Element In Vue

don't use onBlur , it is not accurate. you can create a method to determine if click outside, javascript has a function called closest() .

if you want , you can create a custom vue plugin then you can use globally

clickOutSide (e) {

                if (e.target.closest('.yourModalClass')) {

                    return 

                } else {
            
                //do something
            }
}
Activity icon

Replied to Can't Use Composer On MacOS Catalina

need sudo before move

Jan
05
1 week ago
Jan
04
2 weeks ago
Activity icon

Awarded Best Reply on Display Multiple Items From Object In Array

@hjortur17

public function show(Request $request)
    {
        $recipes = Recipes::where([
            ['maltid', $request->maltid],
            ['vegan', $request->vegan],
            ['heimsalfa', $request->heimsalfa],
            ['kjot', $request->kjot],
            ['spicy', $request->spicy],
        ])->get();

        return response()->json([
        'recipes' => $recipes,
    ]);
    }
submitForm () {
            axios.get('/uppskriftir/sækja', {
                params: {
                    maltid: this.mealsPicked,
                    vegan: this.veganPicked,
                    heimsalfa: this.continentsPicked,
                    kjot: this.foodPicked,
                    spicy: this.spicyPicked
                }
            })
            .then(response => {
               this.recipes = response.data.resipes;
               this.stepCount++;
            })
            .catch(function (error) {
                console.log(error);
            });
        }

then you could avoid make repcies in another loop

in v-for , only one loop could read the recipe

Jan
03
2 weeks ago
Activity icon

Replied to Struggling With OnClose Config In Returned Data

use computed property instead , and remove it from data .

Activity icon

Replied to Display Multiple Items From Object In Array

data () {

    return {
        recipes: '',
        }
    }

this will change recipes to a json object. maybe you should try.

@spamhead2k that is my typo , not his , but still , thank you .

Jan
02
2 weeks ago
Activity icon

Replied to Display Multiple Items From Object In Array

@hjortur17

public function show(Request $request)
    {
        $recipes = Recipes::where([
            ['maltid', $request->maltid],
            ['vegan', $request->vegan],
            ['heimsalfa', $request->heimsalfa],
            ['kjot', $request->kjot],
            ['spicy', $request->spicy],
        ])->get();

        return response()->json([
        'recipes' => $recipes,
    ]);
    }
submitForm () {
            axios.get('/uppskriftir/sækja', {
                params: {
                    maltid: this.mealsPicked,
                    vegan: this.veganPicked,
                    heimsalfa: this.continentsPicked,
                    kjot: this.foodPicked,
                    spicy: this.spicyPicked
                }
            })
            .then(response => {
               this.recipes = response.data.resipes;
               this.stepCount++;
            })
            .catch(function (error) {
                console.log(error);
            });
        }

then you could avoid make repcies in another loop

in v-for , only one loop could read the recipe

Dec
31
2 weeks ago
Activity icon

Replied to Display Multiple Items From Object In Array

<div v-for="first in recipes">
    <div v-for="recipe in first">
         <p>{{ recipe.title }}</p>
    </div>  
</div>

if ok , let me see some axios code and laravel functions, you really need to refactory your code

Dec
30
2 weeks ago
Activity icon

Replied to Router Link Error

you have typo should be

component

you type

components

in your path '/' line

Dec
13
1 month ago
Activity icon

Replied to I Want To Return My Link To Show With The Post->id

return view('/prv/'.$prv->id);

the ->with('status,'Successfull') line should be above with others

Dec
04
1 month ago
Activity icon

Replied to How To Handle Separate HTML Tag That Depend On One Reactive Data.

dude , really don't understand what you are saying. Just post some code please

Nov
29
1 month ago
Activity icon

Replied to Laravel 6 Vue 2 And Axios ERROR NotFoundHttpException

Route::get('/user/{id}', 'API\[email protected]');

you missed a / at the very beginning

Nov
28
1 month ago
Activity icon

Replied to How To Use Vue Router Instead Of Laravel Routing Just For Certain Urls

@mattb then you need to divide your system into 2.

if you don't want to do it , then slightly change my code , allow some controller get through.

or , you can do let all normal visit pass through api routes and vue only. the admin part through the web routes. or do the opposite.

Activity icon

Replied to How To Use Vue Router Instead Of Laravel Routing Just For Certain Urls

@sinnbeck if you are using Vue SPA, there is no need to return another laravel view . Vue-router could handle mutilple vue view pages. laravel can provide data as json format , so vue can CRUD them through axios.

in his case , if he is using history mode , laravel could conflict to vue routers.

Activity icon

Replied to How To Use Vue Router Instead Of Laravel Routing Just For Certain Urls

you are looking for Vue SPA system? and you describe wrong : laravel handles the backend , vue is a frontend framework check vue-router and , in your laravel web routes

Route::any('/{any}', function () {
    return view('welcome');
})->where(['any' => '.*']);

now , if you set vue-router right , it will work.

Activity icon

Replied to Help With Dates

i would suggest you use moment.js , much easier and readable.

Nov
25
1 month ago
Activity icon

Replied to Vue.js Seems Very Very Messy

my suggestion: filters should be done in backend.

Activity icon

Replied to 429 | Too Many Requests

i think it's a global event .hahaha Yesterday when i trying to load my local dev site , 429 appears from nowhere , it never happen before. Maybe it's just because the laravel update. you can change the throttle to a higher number in kernel.php.

Nov
22
1 month ago
Activity icon

Replied to Insert Multiple Data Laravel

you need to show the blade view file

Nov
18
2 months ago
Activity icon

Replied to PhpUnit TEST

he is on windows , your suggestion won't work

Activity icon

Replied to PhpUnit TEST

how you install phpunit? first you need to

composer global require phpunit/phpunit

then add C:\Users\you name\AppData\Roaming\Composer\vendor\bin to you system path

Activity icon

Replied to How Can I Get A Vertical Print Of My Webpage In PDF/Image

search in google chrome extension shop , there are lots of

Nov
16
2 months ago
Activity icon

Replied to Vue Components Are Not Working

what operatiing system are you using? did you copy your components from other machine?

if you are using mac or linux , you may have a permission problem

after copy , inside your compenents fold run

sudo chmod +x *
Activity icon

Replied to Vue Components Are Not Working

npm install

what does the console say?

Nov
15
2 months ago
Activity icon

Replied to Vue.set Add Dynamic Index Within In V-for Loop

use lodash random on a collection is the fastest way

Activity icon

Replied to How To Get This Data On Blade View Of Laravel.

did you just expose your password?

Nov
14
2 months ago
Activity icon

Replied to How To Convert A Jquery Datepicker To Vuejs Component?

the problem is this jquery plugin's own on change event is not a real js event.

$().datepicker().on('dateChange',callback) 

i am justing giving a thought. You have to do the rest by your own.

you still can find a way to do value binding , i miss it , but not a big deal

so we are done here.

as you can see , you don't have to use this jquery plugin , strongly recommend you find another plugin in vue

Activity icon

Replied to File_put_content Error : Failed To Open Stream: Permission Denied

php artisan cache:clear

php artisan view:clear

Activity icon

Replied to How To Convert A Jquery Datepicker To Vuejs Component?

button setdate should be inside child component

Activity icon

Replied to How To Convert A Jquery Datepicker To Vuejs Component?

plus:

if everything fails , separate into 2 components.

the Main component looks like this:

<datepicker-component v-model="date"></datepicker-component>

remember the date is in the parent component Main.

in child component datepicker-component

<input type="text" v-model="jquery-date" @change="emitback">

//

//data return jquery-date

props: ['value'],

methods: {
    emitback () {
        this.$emit('input', this.jquery-date);
    }

}

here comes the magic : the parent put a v-model on the component root , inside child component , it can emit a event back to parent , the name is input. and an prop named value. it makes the parent and child have 2 way binding.

i hope this would be the final solution

Activity icon

Replied to How To Convert A Jquery Datepicker To Vuejs Component?

ok , i kind understand your question.

initial select datetime is ok.

but , when you click edit , the data value changed ,but ,in the input field , it doesn't change right?

Let me ask you a simple question , did you use data to store the date ?

i only saw a $attrs property , don't know what it is. could be a global variable you use or a jquery property.

a common way is :

<input type="text" v-model="date" @click="changedate" class="datepicker">


//in scripts

data () {
    return {
        date: '',
    }
},

if you want to change the date , write a method ,use the datepicker .

in summary , change date which defined in data ,nothing else.

Activity icon

Replied to Vue2

don't bother lecturing him , he has no sense. Next time , just ignore his question.

Nov
13
2 months ago
Activity icon

Replied to How To Convert A Jquery Datepicker To Vuejs Component?

what is the error message?

Activity icon

Awarded Best Reply on Vue Js Component Wont Change On Prop Change.

put it in data , because after mounted , your prop could not be changed.

Nov
12
2 months ago
Activity icon

Replied to Vue2

a word can describe this guy : 'free rider'.

i was hoping he changed , but after nearly 2 years , he does not.

never show respect to others.

i strongly recommend Jeffery introduce a block function , so i could never see his post before he knows what is wrong with him.

Activity icon

Replied to Vue Js Component Wont Change On Prop Change.

since you have using a event bus, you can specify a global varible to store the value.

Activity icon

Replied to Vue Js Component Wont Change On Prop Change.

put it in data , because after mounted , your prop could not be changed.

Activity icon

Replied to Many To Many Using A Pivot Table

i think it is called morphMany relationship

your order can have different type of Model such as product or warehouse ,right?

Activity icon

Replied to Pass Image From Img Tage To Model Via ID Using Java Script

id="front-picture{{ img->id }}"

every id should me unique , or you are showing the same picture

Nov
11
2 months ago
Activity icon

Replied to How To Convert A Jquery Datepicker To Vuejs Component?

what is the SAME THING

you want to use a JQUERY datepicker , not VUE one, i provided a solution, i don't know if you tried or not,

saying 'SAME THING' is that easy.

good luck then.

Nov
08
2 months ago
Activity icon

Replied to Passing Data To The View Without Showing It In The URL

even if you hide it , for example , in Vue axios get , query string will not display , but, in the browser developer tools network tab , you still will see the query string.

Nov
06
2 months ago
Activity icon

Replied to How To Convert A Jquery Datepicker To Vuejs Component?

something like:

import datepicker from 'datepicker' //import

// inside export default

mounted () {

    $.('.yourclassname').datepicker() //like normal jquery usage

}

but , be sure jquery and $ is available


window.jQuery = window.$ = require('jQeuery')