mehalubozo

mehalubozo

Member Since 2 Months Ago

Experience Points
1,200
Total
Experience

3,800 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
1
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 1
1,200 XP
Oct
10
1 week ago
Activity icon

Started a new Conversation Prefix Passport Routes

HI! I want to prefix my Laravel passpost routes. How can I do that?

Sep
27
3 weeks ago
Activity icon

Replied to A Bit Stuck On Simple Relationship

Well in this case you need to chain the relationships. Also because you can have multiple profiles you first need to grab one profile.

$searchLog = App\SearchLog::find(1);

$user = $searchLog->user;
$profiles = $user->profiles;

foreach($profiles as $profile) {
    echo $profile->name;
}

As you can see you can't just grab the profile from the SearchLog since it doesn't know anything about the profile. You first need to grab the user and then the profile. But since a user can have multiple profiles you never know how much results you get back. An alternative approach can be this

$searchLog = App\SearchLog::with('user.profiles')->find(1);

foreach ($searchLog->user->profiles a $profile) {
    echo $profile->name;
}

In general a user has one profile and therefore a one-to-one relationship would fit better, but that is up to you.

Activity icon

Started a new Conversation Building API From Scratch

I want to build an API for my application. I currently have an application with artists and concerts. How can I create an API for it. Are there any video tutorials out there?

Activity icon

Started a new Conversation Order By Concerts For Artists

I have an Artists table and each Artist has many Concerts. On my artists/show.blade.php I show all the Concerts by that Artist:

<div>
    @foreach ($artist->concerts as $concert)
        <div>
            {{ $artist->name }}-<em>{{ $concert->name }} Series</em> ({{ $concert->date->format('Y-m-d') }} 
        </div>
    @endforeach
</div>

This is coming from the Artist.php Model:

public function concerts()
{
    return $this->hasMany(Concert::class);
}

How can I order the concerts in descending order based on date?

Sep
21
1 month ago
Activity icon

Replied to How To Display Html Code After Vuejs?

Thank you! That seems to do everything I need.

Activity icon

Started a new Conversation How To Display Html Code After Vuejs?

Hi,

I have a huge website with a big load that connects lots of apis on the home page. The problem is that the HTML is rendered before vuejs can kick in. This means that my loader indicates show up after my html was already rendered. This looks really bad. I want to show the content after the javascript has been loaded. How can I fix this with VueJS?

Activity icon

Replied to Updating .env Doesn't Take Effect

Oow wow, it's that simple! Thanks for helping me :D

Activity icon

Started a new Conversation Updating .env Doesn't Take Effect

Hi,

I'm changing some configuration in my .env but it doesn't take effect on my application. If die and dump the value I keep see the old value.

I tried to clear my config in another console tab, but that also doesn't work. What can it be?

Sep
03
1 month ago
Activity icon

Started a new Conversation What Is The Difference Between Npm Run Dev And Npm Run Production?

I have all these commands that I can run for my frontend but I don't understand the difference. When do I run what and can I always run them?

Aug
31
1 month ago
Activity icon

Replied to Get ID In Model

I jut needed the id of the user. Thanks for the help

Activity icon

Started a new Conversation API Controller Gives Page Response

Hi,

I created a controller that returns all my users. The api endpoint is working fine. When I create a user I also return the created user in json, all good. But when there is a validation error I get a normal page back.

Here is my code

class UsersController extends ApiController
{
    public function store(UserRequest $request)
    {
        $user = User::create($request->all());

        return response()->json(['user' => $user]);
    }
}

Any idea why this is going wrong?

Activity icon

Started a new Conversation Get ID In Model

How can I get the id of the model from the database in the model itself? In Symphony I always define a method for that. How does Laravel do that?

Aug
18
2 months ago
Activity icon

Started a new Conversation Browser Testing

HI,

I started playing with Laravel Dusk and it's pretty good! Do you guys now any alternatives? With browser support, but with more features?

Activity icon

Started a new Conversation Calculate Birthdate

I have this but of code, how can I get the birthdate of the person?

$now=  Carbon::now();
$patient->dateOfBirth = $input['day'].'-'.$input['month'].'-'.$input['year'];

$age=$now - $patient->dateOfBirth;        
dd($age);

I get Carbon could not be converted to int exception, but I don't understand why!

Aug
17
2 months ago
Activity icon

Replied to Noob Here

Sorry im lazy, the package works perfectly.

Activity icon

Started a new Conversation Varchar Primary Key Empty

Hi,

I have a custom table with a different id. The id consists of 3 characters. Everything works fine for inserting. When display the ID it always returns 0.

@foreach ($invites as $invite)
    <option value="{{ $invite->id }}">{{ $invite->id }} {{ $invite->name }}</option> 
@endforeach

Any clues?

Activity icon

Started a new Conversation Noob Here

Hi, I'm Noob

I get this error "Class 'Form' not found"... How to solve this?