EvergreenWebSystems

EvergreenWebSystems

Member Since 1 Year Ago

Experience Points
12,880
Total
Experience

2,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
125
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 3
12,880 XP
Mar
07
2 months ago
Activity icon

Awarded Best Reply on Multi Edit Form Design

I don't want to narrow down the scope to just single actions, i.e. toggle status, I want to find an expansive solution that will cater for the requirements I have to serve. I.e. toggling the status is just one example. Many other scenarios exist which need to be served, i.e. bulk updating prices, adding a note to multiple item, etc...

I also want to steer away from bringing in a whole framework like Vue, I prefer to keep things as simple as possible using just a combination of vanilla javascript, Laravel and Blade.

Thanks for the advice. If anyone has any other approaches please let me know.

Activity icon

Replied to Multi Edit Form Design

I don't want to narrow down the scope to just single actions, i.e. toggle status, I want to find an expansive solution that will cater for the requirements I have to serve. I.e. toggling the status is just one example. Many other scenarios exist which need to be served, i.e. bulk updating prices, adding a note to multiple item, etc...

I also want to steer away from bringing in a whole framework like Vue, I prefer to keep things as simple as possible using just a combination of vanilla javascript, Laravel and Blade.

Thanks for the advice. If anyone has any other approaches please let me know.

Activity icon

Replied to Multi Edit Form Design

What exactly do you mean? Are you suggesting not to use the multi edit approach?

My clients always request and use the multi edit functionality extensively. So it is a requirement I have to serve. If, for example, a user wants to adjust the status of 50 items it is a terrible user experience if they have to edit 50 items individually.

I want to find a balance between good UI for the user and simple, maintainable code for the developer.

Activity icon

Started a new Conversation Multi Edit Form Design

Using route model binding there seems to be a very clear path for creating, editing and deleting a database item based on a single ID value.

However, I am struggling to find any kind of clear path if you want to edit or delete database items based on multiple IDs.

For example, on page A you have a list of items with checkboxes which allow you to select one or many of the items. On page B you have a form to edit the items. You need to pass the selected row IDs from page A to page B.

So far I have two possible approaches:

  1. Pass an array of IDs in the GET request URL, i.e. ...somewebsite.com/edit/6,4,123,5465. You can then use the IDs in the edit form and finally in the controller update using, for example:

    Model::whereIn('id', $ids)->update(['input' => 'value']);

I don't really like this idea because it isn't scalable, i.e. what if you want to multi edit 100 records ands the IDs are all 10 digits long, your quickly going to hit the max URL length limit.

  1. Use Javascript to collect the selected row IDs on page A and when the user clicks 'edit' use 'ajax/axios/fetch API' to send a post request to a controller which stores the row IDs in a session variable with a unique key. The controller returns the unique key which you then use in your route when you redirect the user to page B. I.e. ...somewebsite.com/edit/KEY. The controller and Page B now have access to all the IDs by accessing the session with the key and again you can use the IDs in the edit form and update using the same method as above.

This approach means you cant have the messy, long URL issue as per idea 1.

Are either of these approaches valid? Or can anyone point me in the direction of some resources about this issue?

Many thanks