binggle

binggle

Member Since 2 Years Ago

Experience Points 2,860
Experience Level 1

2,140 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 24
Lessons
Completed
Best Reply Awards 0
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 Aug
1 day ago

binggle left a reply on [Vue Warn]: Error In V-on Handler: "TypeError: Getlist_charge Is Not A Function" ??

OMG..

you save my friday and weekend..

Thanks a lot @dunsti

binggle left a reply on [Vue Warn]: Error In V-on Handler: "TypeError: Getlist_charge Is Not A Function" ??

I guess it is cause of

@click="getlist_charge('{{ $key }}')"

I don't get why ..

Help me !!

binggle started a new conversation [Vue Warn]: Error In V-on Handler: "TypeError: Getlist_charge Is Not A Function" ??

hi . I just use blade and vuejs script in same php file.

it vomit errors following.

[Vue warn]: Property or method "getlist_charge" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property

[Vue warn]: Error in v-on handler: "TypeError: getlist_charge is not a function"

vue.js:1897 TypeError: getlist_charge is not a function at click (eval at createFunction

Can someone check my codes ?


@php 

$statuss = [
    '1' =>'all',
    '2'=>'waiting',
    '3'=>'done'
];
@endphp 

<div id="main">
     <div class="card-body">
    CHARGES @{{  brand }}

        @foreach( $statuss as $key=>$status )
            <button class="btn btn-sm btn-sm" :class="status_charge=='{{ $key }}' ? 'btn-info' : 'btn-success'" @click="getlist_charge('{{ $key }}')">
            {{  $status }}
            </button>
        @endforeach 
    </div>
</div>


<script>


const main = new Vue({
  el: '#main',
  data() {
    return {
        brand: '1234', 
    }
  },
  method: {
    getlist_charge : function( div) {
        alert( div );
        
    }

  }
})
 

</script> 




brand display '1234' correct ;

TIA

14 Aug
3 days ago

binggle started a new conversation How To Avoid Checking 'composer.json' When Run Command ?

Hi ..

I have to distribute my laravel source code . it includes some of Console Commands which will be runned by Cronjob.

When I run php artisan spme:cmd , it checks 'composer,json' .

But I dont want my client look into my source code in detail nor upgrade without my watching.

how can I avoid checking 'composer.json' ?

binggle started a new conversation Momentjs Format Not Works Properly In Vuejs

hi .

I got json Data from Laravel server

when I display without moment js, it looks fine with correct data .

But with momentjs format it display all wrong data .

check parts of my code.

The followings are working correct as written

@{{ event['event_time'] }}

it displays

2019-08-14 12:00:00 2019-08-14 13:10:00 2019-08-14 14:20:00 2019-08-14 15:30:00 ; ;

But with moment

@{{ moment( event['event_time'], "YYYY-MM-DD HH:mm:ss" ).format( "MM-DD HH:mm" ) }}

08-14 14:03 08-14 14:03 08-14 14:03 08-14 14:03 08-14 14:03 ; ;

it display same and incorrect data

What is wrong with my code ?

30 Jul
2 weeks ago

binggle left a reply on How To Get Model Id In Eloquent Model ?

You saved me !!

Thanks

binggle started a new conversation How To Get Model Id In Eloquent Model ?

hi

I want to get sum of coins table with where in User Model.

class User extends Model
{

  public function today_charge()
  {
    $self = self::class;

    $sum = DB::table('coins')->where('user_id', $self->id)
        ->where('div', 'charge')->where('status', 'confirmed')->sum('amount');
    return $sum;

  }

}

How can I access self->id ?

24 Jun
1 month ago

binggle started a new conversation Vuejs : Cannot Access Store ( Vuex ) In Event.$on

Hi .. I am newbie on Vuejs / Vuex

I am using Laravel 5.8 and Vuejs 2.6.10 , vuex 3.1.1 ..

I can not understand why I can not access $store in event bus .

  • event-bus.js

import Vue from 'vue'; const EventBus = new Vue(); export default EventBus;

  • Toolbar.vue

exit_to_app import { mapGetters } from 'vuex'

import EventBus from '~/event-bus';

export default { components: { Dropdown, LeftDrawer }, created () { this.$bus.$on('logged', () => { // this.isLogged = this.checkIfIsLogged() this.isLoggedIn = this.$store.getters.isLoggedIn; }) }, mounted () { EventBus.$on('LOGIN', function (payLoad) { console.log('payLoad'); console.log(this.$store); --> can not access this.isLoggedIn = this.$store.getters.isLoggedIn; --> not working this.isLoggedIn = this.checkIfIsLogged() --> not working .. }); }, computed : { ...mapGetters([ 'isLoggedIn', ]) }, methods: { checkIfIsLogged () { let token = this.$localStorage.get('access_token') if (token) { return true } else { return false } }, }

}

-- Login.vue

import EventBus from '~/event-bus';

export default { data(){ return { email : "[email protected]", password : "" } }, methods: {

  login: function () {
    let email = this.email
    let password = this.password
    this.$store.dispatch('login', { email, password })
   .then( () => {
     this.event_login( );
    this.$bus.$emit('LOGIN', 'User logged');
     this.$router.push('/')
   })
   .catch(err => console.log(err))
  }
}

}

I want to show 'Logout' text in Toolbar after Login success .

But I guess I can not access store.

See the code again .

mounted () { EventBus.$on('LOGIN', function (payLoad) { console.log('payLoad'); console.log(this.$store); --> can not access this.isLoggedIn = this.$store.getters.isLoggedIn; --> not working this.isLoggedIn = this.checkIfIsLogged() --> not working .. }); },

How can I fix this trouble ?

Is there someone who can help me ?

29 Nov
8 months ago

binggle left a reply on Making Two Different Eloquent Model Using Same Table..

Thank you so much..

that's so nice and perfect !!.

binggle started a new conversation Making Two Different Eloquent Model Using Same Table..

Hi.

I am building web site which use two type members.

for examples , reader / editor

Well.. it is ok to use some filed to discriminate them.

But I dont want to use 'where' phase for distinguish them..

nor to use role permission package something..

So I would like to make two type of model

I migrated 'users' table

and added 'type' field

there is two kinds of keywords for 'type' field ..'editor' and 'reader'

how can I make Editor Model and Reader Model from 'users' table ?..

Is there anybody who can give some tips ?