MaverickChan

MaverickChan

Member Since 2 Years Ago

Experience Points 85,130
Experience Level 18

4,870 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 586
Lessons
Completed
Best Reply Awards 35
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

14 Mar
4 days ago

MaverickChan left a reply on How To Add " - " If Word Is Bigger Than 20 Characters.

laravel has a help function called str_limit , same as PHP function , but it will automatically add three dots after cut the string.


str_limit($yourstr, 20);

12 Mar
6 days ago

MaverickChan left a reply on VUE.js | Display Photos From Storage

@edoc i think you have 2 spell mistakes.

@ziben69

1.in your Photo Model

protected $appends = ['path'];

public function getPathAttributes () {

    return asset('storage/app/' .$this->filename);

}

  1. in your vue component

<img :src="photo.path" />

MaverickChan left a reply on Hi I Am Creating A Link. But In That Link "#038;" Is Automatically Included

in Vue component?

you can put '' before & to escape it.

06 Mar
1 week ago
05 Mar
1 week ago

MaverickChan left a reply on Button On The Same Line / Row

you have a condition , so , every time only one button could be displayed .

what do you really want?

MaverickChan left a reply on Eager Loading BelongsTo Relationship

little confused , are you using Vue as frontend ?

Since you have mentioned component and access like you are in javascript

here is my suggestion:

  1. in your model , you can do append attributes
protected $appends = ['CategoryName'];

public function getCategoryNameAttributes () {

    return $this->category->name;

}


2 . in your javascript you should find this CategoryName attribute already in every single element , it can be displayed as you want

MaverickChan left a reply on All My Apps Run In Windows But Get "419, Session Has Expired" In Mac

@RAFAELMUNOZNL - try php artisan serve in 127.0.0.1:8000 , see if it works.

if so , then your project is fine , it should be a browser issue.

chrome ( assuming you are using ) need a hard refresh.

if does not work , run php artisan cache:clear and php artisan view:clear

27 Feb
2 weeks ago

MaverickChan left a reply on Js Stopt Working Because Of Vue?

@IBE - ``` @yield

is for blade files . you need to change it to 

@stack

MaverickChan left a reply on Vue-router With Laravel/Vuejs

@PK_06 - ok , using default laravel setting works for me . Good luck.

26 Feb
2 weeks ago

MaverickChan left a reply on Form Model Binding In 5.7

@DEVMASTER - oh , i just realize it is a update form.

MaverickChan left a reply on Vue-router With Laravel/Vuejs

@PK_06 - @pk_06 , because , if you are using mode:history , the vue router path such as / really means the root of your project.

so , if you have a laravel route / , that could cause this problem

try this :

Route::get('/', function () {

    return view('spa');//where your vue <router-view> component

});


Route::any('/{all}', function () {

    return view('spa');

})->where(['all' => '.*']); //this prevent any deep routes go to laravel.

then , if you define a route in your routes js such as /about

then in your browser , you can visit localhost/about , this time vue is taking control

25 Feb
3 weeks ago

MaverickChan left a reply on Vue-router With Laravel/Vuejs

did you use mode:history ?

if so , you need to change your laravel route file

MaverickChan left a reply on Form Model Binding In 5.7

@ only need

value="{{ old('firstname') }}"
24 Feb
3 weeks ago

MaverickChan left a reply on Js Stopt Working Because Of Vue?

what is in your layouts file?

MaverickChan left a reply on Js Stopt Working Because Of Vue?

@ibe copy your js file under /public/js

in blade file ,

@push 

<script type="text/javascript" src="/js/map.js"></script>

@endpush

22 Feb
3 weeks ago

MaverickChan left a reply on Js Stopt Working Because Of Vue?

if you dont use webpack to compile your js file then try @push directive of blade

14 Feb
1 month ago

MaverickChan left a reply on Elquent Relation To VUEjs

you can pass $makes as an object to Vue , in Vue you can list all the models

08 Feb
1 month ago

MaverickChan left a reply on Using TinyMCE Editor

tinyMCE has a tutorial , please read the doc . Not that hard .

if you want to combine with VUE , that could be little tricky

03 Feb
1 month ago

MaverickChan started a new conversation Thread And Replies Display Time Wrong?

i notice that when post a new thread or a reply , the display time is 12 hours from the current time. In the main page it is right , but when clicked in , it is wrong. Can you fix it ?

MaverickChan left a reply on Are You Satisfied With The Vue Course?

it is fantastic once you follow the Vue 2 course , and of course , you need to read the Vue docs , which is the most useful and user-friendly docs i have ever seen .

10 Nov
4 months ago

MaverickChan left a reply on Installing PHP 7.2 Extensions On Mac?

@THEBIGK - remove some lines in your php.ini such like

extension=mbstring

because you don't need those in php 7.2 , if you write these , php will think you are trying to use customized lib.

BTW , what is your php version before updated to 7.2?

09 Nov
4 months ago

MaverickChan left a reply on Trying To Use Moment.js

@MARTINBEAN - yeah , copy only takes you 1 sec.

Level 50 means nothing.

you DID COPY MY REPLY , this thread , that is a fact.

MaverickChan left a reply on Love The New Interface

@MARTINBEAN - Really? You copied again? OMG, you should see a doc

MaverickChan left a reply on Trying To Use Moment.js

@MARTINBEAN - right , good excuse , please write your OWN reply next time , don't touch others'

MaverickChan left a reply on Trying To Use Moment.js

@martinbean Are you copying my reply????

where does your this.givenDate come from? Not declared in your code , this is NOT cool , man!

MaverickChan left a reply on Trying To Use Moment.js

use computed property , because moment returns a object , you only need some string format.

try this :

<template>
    <div>
        {{ yourYear  }}
    </div>
</template>

<script>

const moment = require('moment')

props: {
    initial : {
        type: Object,
        default: moment
    },          
},

created () {
    this.givenDate = this.initial
},

computed: {
    yourYear () {
        return moment(this.givenDate).format('YYYY')
    }
}
</script>

Then you can give moment any time you want , let moment do the job.

07 Nov
4 months ago

MaverickChan left a reply on Troubleshoot Mojave

@X-MAC - check the 80 port , could be used by another httpd session

MaverickChan started a new conversation Love The New Interface

nice theme , i love it .

but , course percentage display is missing , and new thread cannot autocomplete at users now

06 Nov
4 months ago

MaverickChan left a reply on Troubleshoot Mojave

check which php first

then if not working , brew reinstall php , should work.

31 Oct
4 months ago

MaverickChan left a reply on Upload File With Form

please use normal form , make it easy and readable .

29 Oct
4 months ago

MaverickChan left a reply on Login Route Redirecting To Image!?!

my guess is browser cache problem.

try these steps :

  1. php artisan cache:clear

  2. php artisan view:clear

  3. make a hard refresh of your browser

24 Oct
4 months ago

MaverickChan left a reply on Where Is A Beginners Tutorial For Scopes?

this guy's tutorial is really inspiring , he use query scope as a trait within the model .

YouTube Video of Query Scope

Hope you can learn something.

MaverickChan left a reply on Calendar Package

actually , you can make your own calendar , it is not that hard , only takes you about 200 lines code ,top, including the html. PHP has datetime function could do all the work for you , all you need to do is display it.

18 Oct
5 months ago

MaverickChan left a reply on Brew Update, Now Nothing Works

run php -v in your console , what does it show?

mostly , you didn't install php right.

16 Oct
5 months ago

MaverickChan left a reply on Vim And Vue

don't torture yourself , try another

MaverickChan left a reply on Vue Crud

vue2 lessons are pretty enough for crud use....

15 Oct
5 months ago

MaverickChan left a reply on Fetch Post JSON Error

why don't you use axios to do the ajax calls?

MaverickChan left a reply on Laravel Update Record With AJAX

show your form html.'

and , request type should be patch or put

02 Oct
5 months ago

MaverickChan left a reply on Laravel App Working Fine On Live Server, But Not On Localhost

what is your local environment ? php artisan serve or using other server?

MaverickChan left a reply on Laravel App Working Fine On Live Server, But Not On Localhost

clear chrome cache . use another browser to test if it is ok. re-compile your js and sass files

30 Sep
5 months ago

MaverickChan left a reply on Displaying V-model Value

@tykus ok , my thought is , he should not assign any value to user.tasks first , leave it blank , then make a method , when select on change trigger that method to assign that value to tasks.

MaverickChan left a reply on Displaying V-model Value

@tykus i think he had a html mistake , you are right , a value could be an array;

@jstanotheract try this:

<select class="form-control" v-model="option">
    <option disabled hidden selected value="">* Please Select an Option</option>
                                
    <option v-for="option in options"  :value="option.id">
                                    
        {{ option.name }}

    </option>

</select>

and , you can get rid of user.task in data , you don't need it , because option 3 is the same , you can default option 3 in select part.

MaverickChan left a reply on [Vue Warn]: Cannot Find Element: #app

@nhayder show me the whole vue error message from console

MaverickChan left a reply on Displaying V-model Value

change

:value="option.id"

value needs to be a string or integer

29 Sep
5 months ago

MaverickChan left a reply on Would This Make Laracasts Forum Better?

history is great .....

MaverickChan left a reply on [Vue Warn]: Cannot Find Element: #app

i didn't see any of your component part

MaverickChan left a reply on [Vue Warn]: Cannot Find Element: #app


<div id="app">

    @yield('content')

</div>

MaverickChan left a reply on [Vue Warn]: Cannot Find Element: #app

1.change de section id to another name;

2, wrap your content in a div which id=app.