COACHTHEM

COACHTHEM

Member Since 3 Years Ago

Experience Points
8,850
Total
Experience

1,150 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
63
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.

Level 2
8,850 XP
Dec
03
2 months ago
Dec
01
2 months ago
Activity icon

Started a new Conversation How To Add Items To Same Array While Looping And Loop The Added Items As Well

How can I accomplish this in php 7. While looping an array I want to push elements to the same array and I want the pushed items also to be looped.

Below is my example

$arr = array(1,2,3);
foreach ($arr as $v)
{
    echo $v . "\n";
    if ($v <= 3)
        array_push($arr, 5);
}

should print 123555 but it stops at 123.

Oct
07
4 months ago
Activity icon

Started a new Conversation Paginate() With Custom Data.

Here is my use case.

  1. I have to fetch blog data by writing sql query and the data needs to be paginated.
  2. The data fetched from above query needs to be looped to create image url for each blog.
  3. After looping each blog record I create a new dimensional array which has all the blog details along with image url

below is the code sample with which I want to fetch all blog data with process image url and I also expect it has pagination details like the total no of pages, current page etc.

public function getBlogs(Request $request) {

   $rawBlogs = DB::table('blogs')
   ->select(['id', 'title', 'content', 'status', 'blog_image'])
   ->where([
       ['status', '=',  'A']
   ])
   ->orderBy('id', 'DESC')
   ->paginate();

   $Blogs = [];
   foreach($rawBlogs-items() as $rawBlog){

       $blog_path = config('app.BLOG_IMAGE_PATH'); 
       $imgPath = $blog_path . $rawBlog->blog_image; 
       $Url = \Storage::url($imgPath); 

       $Blogs[] = [
           'id' => $rawBlog->id,
           'title' => $rawBlog->title,
           'content' => $rawBlog->content,
           'status' => $rawBlog->status,
           'blog_image' => $Url
       ];       

   }

   return [
    'data' => $Blogs,

    current_page => ?,
    first_page_url => ?,
    from => ?,
    next_page_url => ?,
    first_page_url => ?,
    path => ?,
    per_page => ?,
    prev_page_url => ?,
    total => ?  
];

}

Sep
24
4 months ago
Activity icon

Replied to In Vue How To Get The Child Data Into Parent Component

Thanks @mariohbrino for the Solution.. that worked like a charm.

Thank you @willvincent for explaining more in details about two way binding aspect of props between parent and child components.

also thanks to @rouge847

cheers !

Sep
23
4 months ago
Activity icon

Started a new Conversation In Vue How To Get The Child Data Into Parent Component

I have a listing of child components, each component is passed with props data(default values), The child component receives that props data and updates it.

Now after modifying all the prop data from each child component I want to get it in the Parent component.

What would be the best way to handle this case. Should I be using this.$emit('update-parent-props', process_data) custom event for this or is there a better way?

Sep
22
5 months ago
Activity icon

Replied to In Vue How To Update Style Attribute Based On Multiple Conditions

Thanks for the solution @bobbybouwmann . Both solutions works fine. but I think using computed properties makes more sense in terms of performance.

Sep
21
5 months ago
Activity icon

Started a new Conversation In Vue How To Update Style Attribute Based On Multiple Conditions

I am trying to create a inline css property based on certain multiple conditions. I am not sure if the below thing is right way of doing it

:style=" (mode=='edit' && displayTcInputType==true) ? 'visiblity: visible;' : 'visiblity: hidden;' "

Activity icon

Replied to Session Getting Destroyed After Payment Gateway Redirecting To Success Callback Url.

OK I figured out the problem for myself.

In the config/session.php file I changed the configuration from 'same_site' => "strict", to 'same_site' => "lax",