sarky

sarky

Member Since 10 Months Ago

Experience Points
790
Total
Experience

4,210 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
4
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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
790 XP
Mar
26
1 week ago
Activity icon

Replied to Ajax To Pass Onchange

Thanks @deansatch it worked..

it was ".custom-select" ..

Thanks again

Activity icon

Replied to Ajax To Pass Onchange

I have worked on it but still having the same issue and the problem is that the ID of the Select is the same for all.


<form method="POST" id="changeorder">
                            @csrf

                        <select name="orderid" id="orderid{{$deliver->id}}" class="custom-select" data-live-search="true">
                            <option selected>Open this select menu</option>
                        @foreach($orders as $order)
                            <option value="{{$order->id}}|{{$deliver->id}}" {{ $order->id == $deliver->order_id ? 'selected' : '' }}>{{$order->customer->name}}
                                ---{{$order->jobno}}</option>
                        @endforeach
                        </select>
                        </form>

and I do not know how to reference the right ID if I put a dynamic number.

<script>
    $(document).ready(function(){
        $("[id^=orderid]").change(function(){
            var OrderSelection = $('[id^=orderid] :selected').text();;
            alert("You have selected - " + OrderSelection);
        });
    });
</script>
Mar
25
1 week ago
Activity icon

Replied to Ajax To Pass Onchange

@jlrdw Can you please elaborate and give me an example on how to use what you mentioned ..

Don't seem to be able to figure it out.

Thanks

Mar
24
1 week ago
Activity icon

Replied to Ajax To Pass Onchange

good point on the document on change.. I suppose didn't see any errors as that is the only thing that can be changed.

let me give it a try ..

Activity icon

Started a new Conversation Ajax To Pass Onchange

Good day guys

Trying to pass data and update the database on.change of a Select option

At the moment It is passing the information but only working on the first Select Option and not the second or 3rd.....

Can someone have a look and tell me what I am doing wrong or omitted ?

Cheers in advance

<form method="POST" id="changeorder">
                            @csrf

                        <select name="orderid" id="orderid" class="custom-select" data-live-search="true">
                            <option selected>Open this select menu</option>
                        @foreach($orders as $order)
                            <option value="{{$order->id}}|{{$deliver->id}}" {{ $order->id == $deliver->order_id ? 'selected' : '' }}>{{$order->customer->name}}
                                ---{{$order->jobno}}</option>
                        @endforeach
                        </select>
                        </form>

Below is the script I am using

<script>
    $(document).on('change','select',function(){
        let changeorder =  $('#changeorder').serialize();
        $.ajax({
            url: '/delivery/changeorder',
            data: changeorder,
            type: 'POST',
            success: function(response) {
                console.log(response);
            }
        });
    })
</script>

Thanks again Sarkis

Dec
17
3 months ago
Activity icon

Replied to Controlling User Access.

No worries a search got me the answer just checked in the globalscope if the user is Admin then skip .

if (! auth()->user()->isAdmin()) {}

Thanks once more

Activity icon

Replied to Controlling User Access.

@tykus Thanks again for the advice, just sorted the Global Scope.. but I am facing another issue.

I want to be able to show all records if a user has Role Admin; what is the easiest way to check if user hasRole Admin then do query withoutGlobalScope..

Thanks

Dec
15
3 months ago
Activity icon

Replied to Controlling User Access.

I haven't used global scope is there an example you know off I can have a look at, which relates to what I am trying to do.

Thanks

Activity icon

Replied to Controlling User Access.

Ok that makes sense.. so if a user is for companyA he is allowed to view, add, edit and delete .

Ok now need to delete what I have done and start again..

Activity icon

Replied to Controlling User Access.

Ok do I add a column in User to tie it too the company??

Not sure how I reference a user to belong to a company without a pivot table.

Is there an example of what I am asking for I can go through??

Thanks @tykus

Activity icon

Started a new Conversation Controlling User Access.

Good Morning Everyone..

I have an App which is working fine and I have User Control and Roles implemented.

At the moment I am trying to filter which user has access to what content.

For example User A Not admin -> belongsto->companyA can only look modify and vet items relating to companyA.

I am not sure the best method to approach the above, I have done a linking table User Company table..

Any guide on how to approach it would be good

Thanks Again

Sarky

Nov
18
4 months ago
Activity icon

Replied to Yajra Datatable With Relationship

@fredemagi how did you solve this bit ?

"Now another issue arises; The {data: 'customer', name: 'customer.name'} now only returns the whole customer object and not the nested part."

Thanks