araeuchle

araeuchle

Member Since 11 Months Ago

Experience Points 1,450
Experience
Level
Lessons Completed 11
Lessons
Completed
Best Reply Awards 0
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

28 Jan
10 months ago

araeuchle started a new conversation Count Self Referencing Relations

Hey guys,

Okay i am working on a laravel 5.5 project.

We have a user table and in this user table we have a parent field. The parent declines the parent relationship of this object.

So each user can have 1 parent but a user can have multiple children.

 public function parent()
{
    return $this->belongsTo(User::class, 'parent_id', 'id');
}

public function children()
{
    return $this->hasMany(User::class, 'parent_id', 'id');
}

What i want to achieve is. I need to count 5 levels deep how many children a user has.

so i want something like:

Level 1: 585 Level 2: 1539 Level 3: 3294 Level 4: 4949 Level 5: 15939

Without loading the actual objects for sure, as it would kill the page performance.

How can i achieve this with laravel? Heres what i tried, but it loads all the subchildren in a collection.

 $sum = User::with('parent')->where('id','=', $user->id)->get();

Somebody can help me out with that?

Just to be more specific:

Lets say User A is parent of B and C

B is parent of D, E, F C has no children.

The correct output should be:

Level 1: 2 Level 2: 3 (as C has no children)

I want to be able to call it like this:

$user->children(2)->count() Which should output the number of children on level 2

is this possible?

21 Jan
10 months ago

araeuchle left a reply on Can't Connect To AWS API

Hmm that is wierd @JoshBruce I've openend up a ticket on AWS support. i cant even create server in any region.

20 Jan
10 months ago

araeuchle left a reply on Can't Connect To AWS API

Okay first problem is solved. i can now connect to AWS when using forge. But i cant create new server.

Getting this error:

Whoops! There were some problems with your input.

The server provider was unable to create your server. Either try contacting your server provider for more details or add a new server provider credential in your account profile.

araeuchle started a new conversation Can't Connect To AWS API

Hey guys, so today ive registered in AWS and Laravel Forge as well as Laravel Envoyer. Firstable i wanted to create the server on AWS. Ok i've logged into my account in AWS and created a new IAM User. I've created a new Group called Root and attached AdministratorAccess Permission to it. Then i've created AWS API Key and Secret. I've copy & pasted and entered a custom profile name. (I think the profile name can be what i want?) In Laravel Forge when i hit Add Credentials i am getting the error:

Whoops! There were some problems with your input.

Invalid API credentials.

Can u guys tell me what i did wrong? Thanks :)

15 Jan
11 months ago

araeuchle started a new conversation Laravel Forge And AWS Hosting Environment

Hey guys. Ok firstable, Laravel Forge is super awesome! i totally love the idea behind it. But i have one question if this scenario can be achieved with it:

Ok we are going to have the following infrastructure with AWS:

1 Loadbalancer 2 Application Server (EC2 Instances) 1 Amazon Aurora DB 1 Storage Server (Amazon S3)

The application needs to be able to scale horizontally dynamically depending on traffic. Deployments should effect all EC2 Instances running by AWS. Storage Server should be connected to all EC2 instances. It should be possible to select Availability Zones were the servers should be hosted.

Any tip if this can be achieved with forge?

14 Jan
11 months ago

araeuchle left a reply on Task Scheduling In A Big Environment With Two Or More Application Servers

@martinbean: ok awesome! that what i was looking for! thanks for your help!

13 Jan
11 months ago

araeuchle left a reply on Task Scheduling In A Big Environment With Two Or More Application Servers

My understanding problem atm is the following:

The command is called at the same time. so Laravel will have two instances trying to execute the jobs. How is decided which app is executing the job AND is the job really blocked when hit by the other instance first? :)

araeuchle left a reply on Task Scheduling In A Big Environment With Two Or More Application Servers

@martinbean: Thanks for your answer.

So lets assume i have two application servers running and are connected through Load Balancer. I am build a job and add the job. when i call withoutOverlapping() it should prevent to be Double Triggered. is this right? :)

araeuchle started a new conversation Task Scheduling In A Big Environment With Two Or More Application Servers

Hello guys. My first post here! We have started creating a new web application using Laravel 5.5. We are expecting to have several thousands of users so we will host this application on AWS using a Load Balancer and two application servers for the start.

To my question: I have given the following task to create a Job that runs daily at 00:00. Check if a user have birthday, if he has birthday, sent him an email. Also check for his age and depending on his new age he gets a new user role.

I realised that Laravel's build Task Scheduler should be perfect for it, but it wants me to a cronjob every one minute. So i am looking for some solution were i can build something that is really reliable to call long running tasks.

Any help is really appreciated!