Alzaabi98

Member Since 4 Years Ago

Experience Points
22,040
Total
Experience

2,960 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
195
Lessons
Completed
Best Reply Awards
0
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.

  • Community Pillar

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

Level 5
22,040 XP
Mar
21
3 weeks ago
Activity icon

Replied to How To Append Data To Resource Clas

Just found a proper answer to this question.. is it not passed as resource to blade. i need to something like fractel package for this purpose;

https://laracasts.com/discuss/channels/laravel/api-resource-and-passing-data-to-blade-view

or pass as

 $comment->toArray(),

as workaround as mentioned in the link above.

Activity icon

Replied to How To Append Data To Resource Clas

what is weird that I can see it when I echo it as json in browser.. but I cant use inside blade.

Mar
20
3 weeks ago
Activity icon

Replied to How To Append Data To Resource Clas

I want to have more control .. I want to transform comments with more json as well from relationships like replies , user who create it extra.. it is kind of data transformation layer.. this what I am think of.. also I might use later in mobile api .. so it ready for that

Activity icon

Replied to How To Append Data To Resource Clas

I want to have more control .. I want to transform comments with more json as well from relationships like replies , user who create it extra.. it is kind of data transformation layer.. this what I am think of.. also I might use later in mobile api .. so it ready for that

Activity icon

Replied to How To Append Data To Resource Clas

I knew this works but is it possible to make from inside API Resource ?

Activity icon

Replied to How To Append Data To Resource Clas

I create collection in the route as comments then pass to the blade..then I loop via comments .

this code works

{{ $comment->body}}

This does not work

{{ $comment->created_at_human}}
Activity icon

Replied to How To Append Data To Resource Clas

I want to make clean in blade and also I might add more stuff in it . I need to know how can append new fields

Activity icon

Started a new Conversation How To Append Data To Resource Clas

I have CommentResource which return json for all comments . I want to add created_at_human field which is basically a simple diffForHumans() function. I can see the data when print it to browser as json but it is bank inside blade . what is wrong in this code to be able to see it inside blade

 public function toArray($request)
    {
        return [
            'body' => $this->body,
            'created_at_human' => $this->created_at->diffForHumans(),

        ];
    }

This line is blank in blade

  <p>{{$comment->created_at_human}}</p>
Mar
09
1 month ago
Activity icon

Replied to Emit Event From Javascript Inside Livewire Component That Has Video Cause "Failed To Execute 'replaceChild' On 'Node' Error

@guybrush_threepwood .. one thing I didn't notice when I added wire:ignore. The video will continue to play after the emit event but video timer will freeze . This is I think because we ignore the update on the parent div.. so this is side effect .. not sure if there is a solution for it.

Mar
07
1 month ago
Activity icon

Started a new Conversation Emit Event From Javascript Inside Livewire Component That Has Video Cause "Failed To Execute 'replaceChild' On 'Node' Error

I have one component has video using videojs library to load it . In this component I emit event after 3 seconds to mark this vides as watched using this javascript code

 var player = videojs('yt-video')
        player.on('timeupdate', function() {        
            if(this.currentTime() > 3 ) {
                Livewire.emit('VideoViewed')
                this.off('timeupdate')
            }
        })

Then I listen to this event inside the class and I do DB update..

This works fine except one issue .

After the component trigger the event , the video continue to play but it show the play button even the video is playing and remove all video controls also it through this error in the console.

Uncaught DOMException: Failed to execute 'replaceChild' on 'Node': The node to be replaced is not a child of this node.
    at t.<anonymous> (https://vjs.zencdn.net/7.10.2/video.min.js:19:51700)
    at t.<anonymous> (https://vjs.zencdn.net/7.10.2/video.min.js:12:25973)
    at https://vjs.zencdn.net/7.10.2/video.min.js:12:25749
Mar
06
1 month ago
Activity icon

Replied to How To Add CDN For Css Inside One Livewire Component Only ?

thanks @prospero

also stack / push worked as well.

    @stack('styles')
Mar
05
1 month ago
Activity icon

Started a new Conversation How To Add CDN For Css Inside One Livewire Component Only ?

Hi. How can I add cdn for javascript or css to one component only ? I am extending layouts.app laravel layout in my component class. I was thinking this is similar to make yield inside main layout . but not sure how can I inject the urls from the component