latz

latz

Member Since 4 Years Ago

Experience Points
10,970
Total
Experience

4,030 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
93
Lessons
Completed
Best Reply Awards
2
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 3
10,970 XP
Sep
21
1 month ago
Activity icon

Started a new Conversation Translate Sql To Query Builder

Hello,

i have this raw sql-query:

 SELECT firstname, lastname, to_char(birthday, 'DD.MM.YYYY') as birthday
    FROM players
    WHERE (extract(year from age(birthday)) + 1) *  interval '1 year' + birthday between current_date and now() + '60 days'
    ORDER by EXTRACT(Month FROM birthday), EXTRACT(Day FROM birthday) 

I have problems to build the select with the query builder.

My first try:

        ->select('firstname', 'lastname', 'to_char(birthday, 'DD.MM.YYYY') as birthday')
    ...

doesn't work. How can i use 'to_char' and 'as'??

Aug
30
1 month ago
Activity icon

Replied to Return Special Json Format

Yeah, great job :)

Many thanks.

Activity icon

Replied to Return Special Json Format

Thanks for the fast reply. I've got an error:

Call to a member function get() on array

Activity icon

Replied to How To Save Current Date As Unix Timestamps In Postgres?

Postgres uses the datatype timestamp (date + time). If you want to work with the unix timestamp (1567166908) take an another data type.

Activity icon

Started a new Conversation Return Special Json Format

Hello, there are days, nothing works.

My sql-select:

$results = DB::select("
        SELECT count(*) as data
            FROM trainings as t
            JOIN player_training as pt
            ON t.id = pt.training_id
            WHERE art = 't'
            AND t.team_id = $id
            AND status = 'x'
            LIMIT 10;
        ");
   return $results

returns a json response: [{"data":"12"},{"data":"9"},{"data":"10"}]

I need the format: [{"data":[12,9,10]....

I think, i need to parse the data to an array. But i have no idea how this works.

Aug
25
1 month ago
Activity icon

Replied to Json Response Special Format

You need to wrap it into another one, so return [$data]

This works for me. Many thanks

best regards mark

Activity icon

Started a new Conversation Json Response Special Format

Hello, i need a response in a special format.

[{ "data": [47, 59, 28, 54, 77, 19, 20] }]

I created this manually:

$data = array("data" => [47, 59, 28, 54, 77, 19, 20]); return $data

The response from laravel: {"data":[19,20,45,50]}

The brackets are missing at the beginning. How can I create the response with the brackets?

Jul
07
3 months ago
Activity icon

Replied to Birthday List

Thanks for reply. I need raw sql? This is the best way?

Activity icon

Started a new Conversation Birthday List

Hello, I have data with many people. I need a birthday list for the next two month.

Which would be the laravel way to do that? Raw SQL or are there other options?

May
29
4 months ago
Activity icon

Replied to Save Model And Relation

Many thanks!

great support.

May
27
4 months ago
Activity icon

Started a new Conversation Save Model And Relation

i have a model and a many to many relation. My Code to store the request:

  $training = new Training([
              'training' => $request->get('training'),
              'art' => $request->get('art'),
            ]);
            $training->save();
       
        foreach ($request->get('id') as $player) {
            $training->players()->attach($player['id'], ['status' => $player['status']]);
        }

First i save the model and then the data for the relation.

My problem: If an error occurs while saving the relationship data, the model has already been saved. How can I prevent this?

Apr
21
6 months ago
Activity icon

Replied to Array Of Radio Buttons

Thanks. I searched with the wrong term.

Activity icon

Started a new Conversation Array Of Radio Buttons

Hello,

i have an table with persons. Now i need to assign characteristics (with radio buttons)

Example:

.....       male   female
Peter       ()      ()
Elisabeth   ()      () 
Johny       ()      ()

How can I tackle this problem?