narwen

narwen

Member Since 5 Years Ago

Experience Points
3,420
Total
Experience

1,580 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
1
Lessons
Completed
Best Reply Awards
1
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 1
3,420 XP
Jun
08
4 months ago
Activity icon

Started a new Conversation Inserting Model And Its Relation Together Without Saving Them Individually

I want to insert model and its relation at once. I have got a request coming from my blade as following soon object:

{ 
  [
    "first_name" => "test"
    "last_name" => "test"
    "gender_id" => "2"
    "email" => "[email protected]"
    "school" => "test"
    "year" => "2018"
    "parent" => [
      "first_name" => "test"
      "last_name" => "test"
      "email" => "[email protected]"
    ]
  ]
}

Here, attributes are of student and parent is the 'hasOne' relation of the student. So, is there a way to store if at once without having to save them individually.

May
16
5 months ago
Activity icon

Replied to Merging Rules To Validate Requests For Different Conditions

The problem is I am working on an existing project and lot of things are done in separate files of request and most of them are connected to different parts of the application. And there are kinda like lot of fields which can be common so, doing it in the controller is kinda tough. Thanks anyways!

Activity icon

Replied to Merging Rules To Validate Requests For Different Conditions

Sorry mate. Form to submit the post is kinda weird for me. Its very tiny and wasn't sure, if its gonna post!

Activity icon

Started a new Conversation Merging Rules To Validate Requests For Different Conditions

I have to insert a record into a table depending upon conditions. I have member table where a student can also be member. So, there are few extra columns for student and student needs to have guardian details as well which is set in different relation. So, on inserting records I have validation rule like following:

public function rules()
   {
       if ($this->student()) {
          return array_merge($this->studentRules(), $this->generalRules());
       }
       return $this->generalRules();
   }

Since, the studentRules consist of rules for parent details as well. On trying to create a student member, eloquent makes SQL composed op parent details which is on separate table. So, how can I solve this problem efficiently. Thanks