martin182

martin182

Member Since 1 Year Ago

Experience Points
880
Total
Experience

4,120 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
0
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
880 XP
Jun
19
5 months ago
Activity icon

Replied to Carbon CreateFromFormat Not Working

@TYKUS - Thank you! Your solution worked perfectly for me.

Jun
18
5 months ago
Activity icon

Replied to Carbon CreateFromFormat Not Working

Hmm. That would be strange because I said in createFromFormat that the format is Y W. And the date has exactly the same format.

Activity icon

Replied to Carbon CreateFromFormat Not Working

Yes I double checked it.

Activity icon

Started a new Conversation Carbon CreateFromFormat Not Working

Hi, Im trying to get the last day of the week using Carbon. I am using the method createFromFormat. This is what I am doing (validatedData['date'] can be for example: 2019 04):

        $first_date = Carbon::createFromFormat('Y W', $validatedData['date'])->startOfWeek();

I get the following error:

message: "The format separator does not match ↵Trailing data"

Jun
07
5 months ago
Activity icon

Replied to If Month Has No Records Return 0

@CRONIX - Not working :(. I get an error that says that coalesce is not a function.

Jun
06
5 months ago
Activity icon

Started a new Conversation If Month Has No Records Return 0

Hi. Is it possible to return 0 if a month has no records.

This is what I have now. But this doesn't return the monthkey if it hasn't any records.

    DB::table('mshop_order_base')
    ->select(
        DB::raw('sum(price) - ROUND(sum(tax), 2) - sum(costs) as total'), 
        DB::raw("DATE_FORMAT(ctime,'%M %y') as months"),
        DB::raw("DATE_FORMAT(ctime,'%m') as monthKey")
    )
    ->whereBetween('ctime', [$validatedData['from_date'], $validatedData['to_date']])
    ->groupBy('months', 'monthKey')
    ->orderBy('ctime', 'ASC')
    ->get();
Jun
05
5 months ago
Activity icon

Started a new Conversation Decimal Difference In Sum

DB::raw('sum(price) - tax -costs as sums'),

I have a decimal with 4 numbers and a decimal with 2. And because of that it is not calculating correctly. What can I do?

Jun
04
5 months ago
Activity icon

Started a new Conversation Lowercase In Query

I am trying to lowercase a value in a column. Does anyone know how I can do that?

This is what I have:

DB::table('orders')->where('type', 'payment')->select('name', DB::raw("count(LOWER(name)) as amount"))->groupBy('LOWER(name)')->orderBy('amount', 'desc')->get();

Jun
03
5 months ago
Activity icon

Started a new Conversation Using CountUp.js In Laravel

How can I use CounUp.Js: https://github.com/inorganik/CountUp.js

I get this error when I use this library in Laravel:

  • Uncaught ReferenceError: exports is not defined

Can anybody help me?

May
20
6 months ago
Activity icon

Replied to Csrf Token Mismatch

@TISUCHI - Just tried that. And it didn't work. I don't know why I keep getting this mismatch error.

Activity icon

Replied to Csrf Token Mismatch

@VANDAN29 - Already tried :(

Activity icon

Replied to Csrf Token Mismatch

@TISUCHI - So I dont need to include the csrf token in my ajax requests?

Activity icon

Started a new Conversation Csrf Token Mismatch

Hi, I have two ajax post requests. Every time I try to do a post request it says that there is a csrf token mismatch. In both ajax requests I included the csrf token.

example:

       $.ajaxSetup({
           headers: {
               'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
           }
       });


       $( "#session-timeout-dialog-keepalive" ).click(function() {
         $.ajax({
             /* the route pointing to the post function */
             url: '/session/regenerate',
             type: 'POST',
             /* send the csrf-token and the input to the controller */
             data: {
                 "test": "test"
             },
             dataType: 'JSON',
             /* remind that 'data' is the response of the AjaxController */
             success: function(data) {
               getExpiresAt();

             }
         });
        });
Activity icon

Started a new Conversation Refresh Session User

Hi, I am making a popup to notificate the user that the session will be destroyed in an certain amount of time. In the popup I have a button called "continue session". Is there an easy way in Laravel to refresh won't be logged out?