usaandi

usaandi

Member Since 2 Years Ago

Experience Points
5,250
Total
Experience

4,750 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
36
Lessons
Completed
Best Reply Awards
2
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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 2
5,250 XP
Oct
12
2 weeks ago
Activity icon

Replied to How To Install Laravel With Vue Js

DId you register your vue? inside app.js?

app.js

require('./bootstrap');

window.Vue = require('vue');

Vue.component('example-component', require('./components/ExampleComponent.vue').default);

const app = new Vue({
    el: '#app',
});
Oct
07
2 weeks ago
Activity icon

Replied to User's Survey Title Not Displaying

But he didnt even have survery linked to user.

Survery table missed user_id value to link it all together and foreign key

Oct
06
3 weeks ago
Activity icon

Replied to How To Add New Value To Database Column Without Deleting Old Data In Laravel

@spiral I dont know why you want to do that like that but if you really want then

$user = User::find(1);
$userEmails = explode("," , $user->emails) ;

If you want user do have multiple emails registered then you should think another way to do that

Sep
28
4 weeks ago
Activity icon

Replied to How To Hide Button If Status Is 1 And Hide If Status 0?

@anonymouse703

Obviously your variable is called differently

created_at: "2020-09-25T20:20:31.000000Z"
description: "news in the mornin"
id: 1
news_image: "1601094031_4695405942_0fa1fde373_b.jpg"
post_status: 1
title: "News 1"
updated_at: "2020-09-27T03:58:31.000000Z"

// based on data
news.post_status
// yours
news.status
Sep
25
1 month ago
Activity icon

Replied to Popup Tailwind With Laravel Jetstream Not Work

@gianmarx Can you use onclick event? if so

<button onclick="toggleModal(this)">

<script>
   toggleModal(element) { 
	element.classList.toggle( "modal-active" );}

</script>

this will capture current clicked element details and passes them to function

Or pass it from your for loops

Sep
24
1 month ago
Activity icon

Replied to API Resource With Pagination

@matz Cloned your project and tested. You had to return only your collection without any extra wrapping

class UserCollection extends ResourceCollection
{
    /**
     * Transform the resource collection into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
		'data' => $this->collection,  // Replaced this with
        	$this->collection, // This
        ];
    }
}


Activity icon

Replied to Why My Date Input Doesn't Show The Initial Value Of The Model?

console.log your props value in mounted life cycle hook

mounted() { 
	console.log(this.raw_post)
}
Sep
21
1 month ago
Activity icon

Replied to Home View Is Not Showing In SPA Laravel Vue

you're mounting your app to element with id = '#app'

const app = new Vue({
    el: '#app',
    router
});

But as i see your router-view is defined in div with id = content

EDIT: nvm saw that you have app defined. But is your component inside that div? see below

<div id="app">
	<div id="content">
                <router-view></router-view>
	</div>
</div>
	

And did you compile your js? npm run dev?

defer is not needed if include your javascript at the bottom of the body

</body
	<div id="app">

	</div>
	<script src="{{ asset('js/app.js') }}" defer>
</body>
Sep
17
1 month ago
Aug
19
2 months ago
Activity icon

Awarded Best Reply on Vue - Chart JS | Laravel

  let response = await fetch('/dedicated/server/142/charts');
  let data = await response.json()

  console.log( response );

Do you get anything

Activity icon

Replied to Refactor Blade Code Into Vue Code

Inside your blade file pass data to Vue template

Something like this

//Blade file
    <div id="app">

	//Vue template
        <profile-view :user='@json($user)'>

        </profile-view>

    </div>
Activity icon

Replied to Vue - Chart JS | Laravel

Did you get your data?

Activity icon

Replied to Vue - Chart JS | Laravel

  let response = await fetch('/dedicated/server/142/charts');
  let data = await response.json()

  console.log( response );

Do you get anything

Activity icon

Replied to Vue - Chart JS | Laravel

console.log (stats)

So you can check if anything even console.logs

Aug
17
2 months ago
Activity icon

Replied to Vue Js Infinit Scroll Disable After Page 3 And Replace With “load More” Button?

I would create simple Vue custom directive

import Vue from 'vue';
Vue.directive('scroll', {
  inserted: function (el, binding) {
    let f = function (evt) {
      if (binding.value(evt, el)) {
        window.removeEventListener('scroll', f)
      }
    }
    window.addEventListener('scroll', f)
  }
})

now you can use that inside your Vue component

<template>
	<div v-scroll="handle">
   	   <post v-for="post in posts" :post="post"></post>
    	</div>
</template

And method to handle that

 methods: {
        handle(evt, el){
		//Custom logic to handle loading
          let elHeight = el.clientHeight;
          let pageBottom = evt.target.defaultView.innerHeight + evt.target.defaultView.scrollY;
          let percentageScrolled = pageBottom * 100 / elHeight;
          if(percentageScrolled > 90 && !this.$store.state.posts.isLoading){
            this.$store.dispatch('posts/loadNextPosts');
          }
        }