GeorgeW

GeorgeW

Member Since 3 Years Ago

Experience Points
3,150
Total
Experience

1,850 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
13
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 1
3,150 XP
Feb
25
21 hours ago
Activity icon

Replied to Load And Populate 2 Textboxes Based On Dropdown Selection

First you'll need to add id="max_score" and id="total_weighted_score" to your 2 inputs.

And instead of 2 endpoints just have 1 and put both bits of logic in there?

$(document).ready(function(){

    $("#goal_type").on('change', function postGoalType(){

        var goal_type_id = $(this).val(); 

        $.ajax({ 
            url: 'appraisal_goals/getScores', //your endpoint
            data: { goal_type_id: goal_type_id }, //data being passed
            type: 'post'
        }).done(function(responseData) {

          $('#max_score').val(responseData.maxscore); //populate the max_score input
      $('#max_score').val(responseData.totalweightedscore); //populate the total_weighted_score input

        }).fail(function() {

            console.log('Failed');

        });
    });

}); 

In your controller method after your logic you should return the following:

return response()->json([
    'maxscore' => $maxScore,
    'totalweightedscore' => $totalWeightedScore
]);
Activity icon

Replied to Load And Populate 2 Textboxes Based On Dropdown Selection

Hi @noblemfd, it would probably be best to use jquery and ajax to retreive the max_score and employee_score from your database.

$(document).ready(function(){

    $("#goal_type").on('change', function postGoalType(){

        var goal_type_id = $(this).val(); 

        $.ajax({ 
            url: '', //your endpoint
            data: { goal_type_id: goal_type_id },
            type: 'post'
        }).done(function(responseData) {

            console.log('Done: ', responseData); 

        }).fail(function() {

            console.log('Failed');

        });
    });

}); 

You will need to create the api endpoint to handle the logic in the backend and the return the data.

Feb
24
1 day ago
Activity icon

Replied to Delete Record By Selecting Option In Dropdownlist With A Delete Link.

@alicechan98 Your <a href = 'deleteroom/{{ $value->roomCode }}'>Delete</a> is outside of your @foreach. You might be better off using javascript to dynamically set the value within your <a href = 'deleteroom/{{ $value->roomCode }}'>Delete</a> when a new option is selected

Feb
20
5 days ago
Activity icon

Replied to Recursive Menu

@sinnbeck Thankyou!

Activity icon

Started a new Conversation Recursive Menu

My Tags Model has the following:

public function childrenRecursive()
    {
        return $this->children()->with('childrenRecursive');
    }

This works fine and gives me the children recursivley of each tag.

I am trying to build a menu using this and am using the following to test:

 @foreach(App\Tag::all() as $tag)
    - {{$tag->name}} <br />
        @foreach($tag->childrenRecursive as $item)
        -- {{ $item->name }} <br />
            @foreach($item->childrenRecursive as $item)
            ----- {{ $item->name }} <br />
            @endforeach
        @endforeach
    @endforeach

But instead of having to add a foreach manaully for a new child level is there a way to do it dynamically?

Thankyou in advance!

Feb
15
1 week ago
Activity icon

Awarded Best Reply on Is It Simple Or At Least Possible To Run Vanilla PHP Projects In A Laravel Valet Environment?

@greevesh Its super easy and just works with vanilla php or frameworks. After running valet park and then creating a new directory for your vanilla php site you can access it as you would a laravel site.

Feb
13
1 week ago
Activity icon

Replied to Is It Simple Or At Least Possible To Run Vanilla PHP Projects In A Laravel Valet Environment?

@greevesh Its super easy and just works with vanilla php or frameworks. After running valet park and then creating a new directory for your vanilla php site you can access it as you would a laravel site.

Jan
21
1 month ago
Activity icon

Replied to There Is One Forum Thread And Its Having 3 Replies , I Want To Show The Replies Dynamically

Thread::where('id', $id)->withCount('replies')->get();

Jan
03
1 month ago
Activity icon

Awarded Best Reply on How To Extract Emailid From Email Before Saving It

'username' => strtok($request->email, '@'),

Activity icon

Replied to How To Extract Emailid From Email Before Saving It

'username' => strtok($request->email, '@'),

Dec
03
2 months ago
Activity icon

Awarded Best Reply on Date To Julian Format

@willvincent thats what i was looking for dayofyear, thanks for your help. And PS i had googled trying to find this!!

Activity icon

Replied to Date To Julian Format

@willvincent thats what i was looking for dayofyear, thanks for your help. And PS i had googled trying to find this!!

Dec
02
2 months ago
Activity icon

Replied to Date To Julian Format

Thankyou for the links but that is creating a Julian Day not Date.

So todays Juian Date is 19336

I need to convert "12/19/2019" to 19336

or simple get the day number from the year so 336 for today

Activity icon

Started a new Conversation Date To Julian Format

Hello,

I have the following code:

 date = "12/19/2019"
 $date = Carbon::parse($event->data['date']);

I would like to convert this to a Julian Date

20001

I just cannot find anything to easily convert this to julian.

Thanks in advance.