lightyagami

lightyagami

Member Since 2 Years Ago

Experience Points
1,930
Total
Experience

3,070 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
0
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 1
1,930 XP
Jun
04
1 month ago
Activity icon

Awarded Best Reply on TypeError: This.nav.find Is Not A Function Smartwizard

try put a class in your <ul>:

<ul class="nav">
....
</ul>

reference: http://techlaboratory.net/jquery-smartwizard

Activity icon

Replied to Best Practise

a few days ago i created a table in my database called profiles then i created a model to it and a relationship in my User model, i needed create the profile when user is registering, so i made it:

protected function create(array $data)
    {
        $user = User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => Hash::make($data['password']),
        ]);

        $user->profile()->create([
            'user_id' => $user->id,
            'name' => $data['name'],
            'lastname' => $data['lastname'],
            'phone' => $data['phone'],
            'postal_code' => $data['postalcode'],
            'address' => $data['address'],
            'number' => $data['number'],
            'city' => $data['city'],
            'state' => $data['state'],
        ]);

        return $user;
    }

and it works

Jun
03
1 month ago
Activity icon

Replied to TypeError: This.nav.find Is Not A Function Smartwizard

try put a class in your <ul>:

<ul class="nav">
....
</ul>

reference: http://techlaboratory.net/jquery-smartwizard

May
18
1 month ago
Activity icon

Started a new Conversation Return Records From Multiple Related Tables Using Eloquent

i'm trying return from a eloquent query data from the following tables:

users, exams, questions, answers, exam_question (pivot), essays, users_answers, users_essays.

so, the exam is the main here, i want select the exam that the user finished in my app. each exam has (n) questions and the questions had the answers (5 max), the user can select only one answer (input radio at the form), if selected, the answer is stored in users_answers table, essay in users_essay table, users_answers and users_essays has the id of the user and id of the question and answer table.

this is my schema (not sure if is ok): https://dbdiagram.io/d/5ec01ae339d18f5553ff4d9d

tried several ways here, but i ended a bit stuck with this, i made 3 nested for loops exams -> questions -> answers but it not work since i must retrieve the users_answers and users_essays too at same query. i want retrieve it like:

[exam] => [ question1 => user_answer, question2 => user_answer ]; from a specific user.

ps: my answers table has one field called: is_correct (boolean) so... i can check if the answers is right or not in my view.

Apr
07
3 months ago
Activity icon

Replied to Authentication From External Source

hmmm... cool, i will try this aproach, thanks!

Activity icon

Started a new Conversation Authentication From External Source

our app connect to a external source to make the auth, then, return us the session token, with that token, we make the user login in our app (it's not laravel), NOW, i want make the same, this time inside a laravel app. how i can login a user just using this session token?

Jan
27
5 months ago
Activity icon

Replied to Reorder Multidimensional Array

sorry for later response, cool code, i might make it in eloquent.

Jan
23
5 months ago
Activity icon

Replied to Reorder Multidimensional Array

tried it, it does same as my foreach loop, but i need reorder it by month and product quantity... i'm stuck with it, still strying, if succeed i will post here

Activity icon

Started a new Conversation Reorder Multidimensional Array

i have the following array:

return [
 'january' => [
                 'food' => ['bread' => 2, 'rice' => 4, 'beans' => 3],
         'cleaning' => ['soap' => 5, 'disinfectant' => 10]
],
'march' => [
        'food' => ['cookies' => 2, 'pizza' => 1],
        'cleaning' => ['tooth paste' => 5, 'paper' => 10]
],
'february' => [
        'food' => ['meat' => 3, 'potato' => 20, 'pasta' => 15, 'carrot' => 10],
        'personal_cleaning' => ['deodorant' => 6, 'soap' => 10]
]
];

i must sort it by month and the quantity of the products by greater to minor. then output it in a new array like this:

[
    ['january', 'food', 'rice',  4],
    ['january', 'food', 'beans', 3],
    ['january', 'food', 'bread', 2],
    ['january', 'cleaning', 'disinfectant', 10],
    ['february', 'food', 'potato', 20],
    //... and so on
];

this way i can send it to a excel class, tried it with eloquent but no luck, i made 3 foreach loops that worked, but without the sort of the months and quantity