How A 120mm Tank Round Works

http://img.youtube.com/vi/gJz8cVUvYws/0.jpg

Here’s something informational for Sunday, Nicholas Moran explaining exactly how a modern 120mm (AKA 120×570mm NATO, the type used by the M1A2 Abrams and the German Leopard 2) APFSDS round works.

  • He has a dummy blue round to demonstrate the features. “All the projectiles are color coded. Explosive, for example, would be green with yellow lettering.” APFSDS rounds are black.
  • “The aft cap is the one piece which is left behind after a modern round is fired, and this takes up a lot less room than a traditional shell casing rattling around inside the tank once you fire it.”
  • A long primer rod runs up the middle for more even propellent burning.
  • “A modern tank does have a firing pin. It’s electrically fired, but it has a firing pin. It looks just like a firing pin you’d expect from a rifle, except it’s about yay long…Electricity goes through the firing pin, sets off the primer, which sets off the propellant, which gives you
    the big boom.”

  • There are even emergency hand crank firing systems with dynamos to use if the electrical system goes down.
  • “The rest of the shell casing is made of a form of cellulose, and it is burned up in the explosion. So the aft cap is sufficient to seal the breach instead of requiring the entire casing to expand as you you’d find on a traditional round.”
  • “The catch is that this is simply not as robust as a metal shell.” Which is why the loader has to inspect rounds for scratches or bulges to the water-resistant coating. That could cause the round to break apart or misfire. “This is a bad thing.”
  • Which is why tank crews practice misfire drills to ensure safe handling of rounds so they don’t spread loose propellant all over the tank’s interior.
  • “The kinetic energy penetrator is itself a dart… it’s got fins at the back to keep the pointy end forwards, and it is kept centered as it goes down the tube by these sabot petals.”
  • “Modern sabots seem to have settled on three of these petals per projectile. Once the projectile has left the muzzle, the air is caught by the petals and they are peeled away.”
  • The discarded petals are a danger. “This is why sabot rounds such as APFSDS or M-PT should not be fired over the heads of friendly infantry.”
  • “The dart goes that way, hits metal, and basically punches through, taking little bits of metal inside with them. This is called a spall. These little fragments metal are extremely unhealthy to anyone or anything inside the vehicle which it hits.”
  • “However, if the armor is too thin to produce spalling, you get what is known as over-penetration. So you make a dart-sized hole on one side of the vehicle, a dart-sized hole on the far side of the vehicle, and dart sized holes on anything in-between, and outside of brown pants for the crewmen, quite possibly nothing else.”
  • “If so you’re firing such a target, you’re probably better off using a shaped charge round such as HEAT.”
  • He then show off a dummy HEAT projector, which has a funky blunt circular head that “in effect clears the air as a wind shield for the decidedly non-aerodynamic flat bit. The main body of the round also performs something of a stabilizing function and thirdly provides adequate standoff or room for the penetrating jet to form.”
  • “Here is a metal cone surrounded by explosives. The explosives detonate, the cone collapses the liner.”
  • Text popped up on screen at 9 minutes in notes that the penetrating jet is not high temperature plasma.
  • Here’s another video that provides a visualized simulation of how APFSDS rounds work.

    Lawrence Person’s BattleSwarm Blog

    These $20 Welding Gloves Will Make You a Campfire Hero

    https://s3.us-east-1.amazonaws.com/images.gearjunkie.com/uploads/2023/06/welding-mitts-scaled.jpg

    welding glove giving thumbs up over a fire

    It never fails. Every time the sun goes down and I pull out my mitts, somebody laughs out loud and asks, “What the hell are those?!” And every time I tell them, they scoff and shake their head. Another non-believer.

    It’s OK — I know that before this fire burns down to ash, they will don these dirty old mitts over and over again. And inevitably they’ll admit, “I was wrong. These are awesome!”

    I’ve seen it happen enough times to know, this is the way. And truth be told, I really do not recall why I wanted a pair of welding gloves in the first place. I’m not a metal worker, and I can’t say I’d ever used such burly hand protection in the past. All I know is that one year, I received a pair of gloves — this pair — as a gift, and I knew instantly they were destined for the campsite.

    Now, I will pass this wisdom, this secret, to you. These $20 mitts will give you more value than your favorite tent, headlamp, or sleeping bag. And they will add more fun to your campouts to boot!

    What the Heck Are Welding Gloves?

    Before I get too deep into extolling the virtues of welding mitts, you probably need to know what exactly I’m talking about. Welding gloves, aka fire mitts, aka (my favorite) forge gauntlets are heavy-duty hand protection that cover the hands and most of the wearer’s forearm.

    They’re designed to protect against extreme heat, electric shock, and ultraviolet and infrared radiation. They have nothing to do with Infinity Stones, though you will be tempted to talk like Thanos while wearing them — and rightly so.

    pair of welding gloves, crossed
    (Photo/Adam Ruggiero)

    These mitts are most often made from animal hide (nature usually does it best), either cow, pig, deer, or elk. The heavier the hide, the more protective the glove, so cow and elk usually offer the most protection.

    Vegan alternatives do exist, though I have not personally tried them and therefore cannot attest to their overall performance. Check out the Vegan Foundry for more information if you’d prefer non-animal-derived alternatives.

    For the sake of this tribute, however, I will focus on my cowhide leather gauntlets.

    Welding Gloves for the Campsite

    Let’s get down to (scorching hot) brass tacks: Why am I so hyped on welding gloves as a camp accessory? The long answer is community, togetherness, and making the most of your precious time outdoors — especially in the company of those you hold dear.

    But the short answer is fire. More specifically, the god-like power to bend the ferocity and majesty of fire to your will. To the non-glove-enlightened layperson, I’m talking about picking up white-hot burning logs from a veritable cauldron of fire, and moving them about to stoke the flames to your liking.

    Let me paint a picture with which you are all too familiar: Your once-mighty campfire has burned down, and only a single, flickering flame laps at a thick log, charred on one side, but seemingly untouched on the other. If only you could turn the wood and feed those hungry embers, your evening under the stars would stretch on into the night — more drinks, more stories, more time.

    So you grab the first branch you can find and start fencing with the log, hoping to coax it over with some combination of pokes and swats. Of course, this inevitably ends in the collapse of the delicate, Jenga-like wood pyramid, immediately snuffing out whatever hope of flame remained, casting everyone around the fire pit into the smokey death throes you’ve wrought.

    Sound familiar? If only you had a pair of forearm-length welder’s mitts rated to 932 degrees Fahrenheit, you could have simply grabbed the log, turned it over like a half-cooked hot dog, and won the awe of your campmates.

    Believe me, I know — I’ve been that hero many times over.

    More Than Just Log-Turners

    Moving logs around a hot campfire like pieces on a chessboard has proven the most common use for me. But it is far from these gloves’ only application around the campsite.

    Seasoned car campers know that a few nights under the stars doesn’t necessarily mean settling for freeze-dried camp meals. A trusty cast iron skillet or Dutch oven is perfectly suited to meal prep over an open fire. But that sizzlin’ hot skillet isn’t gonna pull itself out of the fire — uh oh, did you forget your trout-shaped oven mitts?

    Fire gloves to the rescue! Pick up that piping hot pan with one hand or two, by the handle or cradle it from the glowing red bottom — you’ve got the power!

    Plus, these thick mitts offer protection from more than just searing heat. Did your Frisbee land in a cactus patch? Gloves. Good lord, what’s that crawling in the tent?! Gloves. Keys fall in deer scat? Gloves.

    In just about any scenario where you want your bare hands protected from things that are too hot, sticky, prickly, or creepy, welder’s gloves come in handy.

    When you’re ready to level up your campfire game, you can find OZERO welding gloves — or any other brand — at a variety of independent supply stores, giant box retailers like The Home Depot, and online at Amazon for around $20.

    No need to thank me. I’m just your average, everyday campfire hero.

    The post These $20 Welding Gloves Will Make You a Campfire Hero appeared first on GearJunkie.

    GearJunkie

    South Korean dude rejects being called racist for hating Little Mermaid: “You keep asking us to watch sh*tty movies”

    https://www.louderwithcrowder.com/media-library/why-is-little-mermaid-bombing-in-south-korea.png?id=34131336&width=980

    Allow me to admit up front I could be jumping to conclusions. There is a story in the news about a raaaaacist backlash to Disney’s The Little Mermaid. A video of a based South Korean chad is going viral being asked about a raaaaacist backlash to a movie. Perhaps he’s being asked about a raaaaacist backlash to a different movie? If that is the case, allowed me to apologize on behalf of all of us here at the Louder with Crowder Dot Com website.

    Now check out my man here.

    That’s nonsense. So you keep asking us to watch the sh*tty movies you make, right? Why do we have to watch them? This has nothing to do with racism, alright? You make a weird movie, and if we don’t watch it because we don’t agree with your agenda, it’s like they’re trying to lecture us, asking "Why don’t you agree?’ But who are they to lecture anyone?"

    Hell yeah, brother. You have now become the second most based Asian on all of the Internets. Shout out to #1:

    The "Western media" in question could be Western journalisming content creators CNN. They posted a piece of content titled "‘The Little Mermaid’ tanks in China and South Korea amid racist backlash from some viewers." The CNN blogger who created the content points out that while having a black Ariel has been "celebrated elsewhere" (like in America, and in… America), a handful of cherry-picked Asian cinephiles disagree with the casting choice.

    In the case of South Korea, CNN cites one single person who expressed disappointment on Instagram.

    [The Little Mermaid] brought in just 19.5 million yuan ($2.7 million) in its first five days, compared with 142 million yuan (nearly $20 million) for “Spider-Man: Across the Spider-Verse” in the first five days of that film’s opening, according to Chinese box office tracker Endata.

    Similar sentiment was found on social media in South Korea. On Instagram, one user wrote that the movie had been “ruined” for them, adding “#NotMyAriel.”

    Right. It could be raaaaacist backlash. Or, your movie can get just suck. The Spider-Man: Across the Spider-Verse movie that has made at least five times more money? The lead character has brown skin and the leading lady may or may not be trans.

    There are two things at play here. The first is that Hollywood makes movies counting on the Asian market to make them their money. It’s why John Cena had to cuck himself for saying the word "Taiwan." If a movie doesn’t do well overseas, it’s a global failure.

    This brings us to point number two. In the woke progressive hive mind, nothing is ever their fault when normies reject the Left pushing an agenda. It can only be the fault of an -ism or a -phobia. It started with the girl Ghostbuster movie in 2016, which looked like a bucket of sh*t from the first trailer. When moviegoers decided not to spend their money on a bucket of sh*t, filmmakers lashed out at the audience. A single YouTube comment from someone who said "the movie ruined their childhood" was used in the marketing to shame people into seeing the movie if they didn’t want to be labeled an -ist.

    If you make movies that don’t look like they suck, people will spend money to go see your movie. This isn’t something that needs to be explained.

    ><><><><><><

    Brodigan is Grand Poobah of this here website and when he isn’t writing words about things enjoys day drinking, pro-wrestling, and country music. You can find him on the Twitter too.

    Facebook doesn’t want you reading this post or any others lately. Their algorithm hides our stories and shenanigans as best it can. The best way to stick it to Zuckerface? Bookmark LouderWithCrowder.com and check us out throughout the day! Also, follow us on Instagram and Twitter.

    Louder With Crowder

    Crashing Two Bullets Into Each Other in Slow-Motion

    https://theawesomer.com/photos/2023/06/colliding_bullets_smarter_every_day_t.jpg

    Crashing Two Bullets Into Each Other in Slow-Motion

    Link

    Inspired by a pair of Civil War-era bullets that collided and fused together, Destin from Smarter Every Day wanted to see if he could replicate the unlikely situation on camera. It took an impressive amount of planning and engineering to set up the shot and perform the experiment in a safe and precise way.

    The Awesomer

    Laravel Ecommerce Tutorial: Part 6.3, Editing Products

    https://res.cloudinary.com/dwinzyahj/image/upload/v1686431555/by9pmeuxnj9rwdtuxeku.jpg

    In the last post, we added the ability to list all products, search with Scout and Spatie Query Builder, the ability to delete products. This part 6.3 of the on building an ecommerce website in Laravel from start to deployment.

    In this post we will continue to add the ability to edit products.

    Let’s dive in

    Head over to Admin\ProductController and edit the edit action and tell laravel to return the edit page

    /**
     * Show the form for editing the specified resource.
     *
     * @param Product $product
     * @return Renderable
     */
    public function edit(Product $product)
    {
        $categories = Category::all();
    
        return view('admin.products.edit', [
            'product' => $product,
            'categories' => $categories
        ]);
    }
    

    Then let’s edit the admin.products.edit view, the markup will be the same as the create view except this time we pre populate the fields and submit the form to the update action

    Add the following snippet to your edit view

    @extends('layouts.app')
    
    @section('title')
        Edit Product
    @endsection
    
    @section('content')
        <section class="section">
            <div class="section-header">
                <div class="section-header-back">
                    <a href=""
                       class="btn btn-icon"><i class="fas fa-arrow-left"></i></a>
                </div>
                <h1>
                    Edit Product
                </h1>
                <div class="section-header-breadcrumb">
                    <div class="breadcrumb-item active"><a href="#">Dashboard</a></div>
                    <div class="breadcrumb-item"><a href="">Products</a></div>
                    <div class="breadcrumb-item">
                        Edit Product
                    </div>
                </div>
            </div>
    
            <div class="section-body">
                <h2 class="section-title">
                    Edit Product
                </h2>
    
                <p class="section-lead">
                    On this page you can edit a product and fill in all fields.
                </p>
    
                <div class="container">
                    <div class="row">
                        <div class="col-12 col-md-7">
                            <div class="card rounded-lg">
                                <div class="card-header">
                                    <h4>Basic Info</h4>
                                </div>
                                <div class="card-body">
                                    <form class=""
                                          action=""
                                          method="post"
                                          id="storeProduct">
                                        @csrf
                                        @method('PATCH')
    
                                        <div class="form-group mb-3">
                                            <label class="col-form-label"
                                                   for='name'>Name</label>
                                            <input type="text"
                                                   name="name"
                                                   id='name'
                                                   class="form-control @error('name') is-invalid @enderror"
                                                   value="">
    
                                            @error('name')
                                                <div class="invalid-feedback">
                                                    
                                                </div>
                                            @enderror
                                        </div>
    
                                        <div class="form-group mb-3">
                                            <label for='description'
                                                   class="col-form-label">
                                                Description
                                            </label>
    
                                            <textarea name="description"
                                                      id='description'
                                                      rows="8"
                                                      cols="80"
                                                      ></textarea>
    
                                            @error('description')
                                                <div class="invalid-feedback">
                                                    
                                                </div>
                                            @enderror
                                        </div>
                                    </form>
                                </div>
                            </div>
    
                            <div class="card rounded-lg">
                                <div class="card-header">
                                    <h4>Media</h4>
                                </div>
                                <div class="card-body">
                                    <div class="form-group"
                                         data-controller="filepond"
                                         data-filepond-process-value=""
                                         data-filepond-restore-value=""
                                         data-filepond-revert-value=""
                                         data-filepond-current-value="">
    
                                        <input type="file"
                                               data-filepond-target="input">
    
                                        <template data-filepond-target="template">
                                            <input data-filepond-target="upload"
                                                   type="hidden"
                                                   name="NAME"
                                                   form="storeProduct"
                                                   value="VALUE">
                                        </template>
                                    </div>
                                </div>
                            </div>
    
                            <div class="card rounded-lg">
                                <div class="card-header">
                                    <h4>Pricing</h4>
                                </div>
                                <div class="card-body">
                                    <div class="row mb-3">
    
                                        <div class="form-group col-md-6">
                                            <label class="form-label"
                                                   for='price'>Price</label>
    
                                            <div class="input-group">
                                                <div class="input-group-text">
                                                    $
                                                </div>
    
                                                <input form="storeProduct"
                                                       type="text"
                                                       name="price"
                                                       id='price'
                                                       placeholder="0.00"
                                                       class="form-control @error('price') is-invalid @enderror"
                                                       value="">
                                                @error('price')
                                                    <div class="invalid-feedback">
                                                        
                                                    </div>
                                                @enderror
                                            </div>
    
                                        </div>
    
                                        <div class="form-group col-md-6">
                                            <label class="form-label"
                                                   for='discounted_price'>Discounted price</label>
    
                                            <div class="input-group">
                                                <div class="input-group-text">
                                                    $
                                                </div>
    
                                                <input form="storeProduct"
                                                       type="text"
                                                       name="discounted_price"
                                                       id='discounted_price'
                                                       placeholder="0.00"
                                                       class="form-control @error('compare_price') is-invalid @enderror"
                                                       value="">
                                                @error('compare_price')
                                                    <div class="invalid-feedback">
                                                        
                                                    </div>
                                                @enderror
                                            </div>
    
                                        </div>
                                    </div>
    
                                    <div class="form-group">
                                        <label class="form-label"
                                               for='cost'>Cost per item</label>
    
                                        <div class="input-group">
                                            <div class="input-group-text">
                                                $
                                            </div>
    
                                            <input form="storeProduct"
                                                   type="text"
                                                   name="cost"
                                                   id='cost'
                                                   placeholder="0.00"
                                                   class="form-control @error('cost') is-invalid @enderror"
                                                   value="">
                                            @error('cost')
                                                <div class="invalid-feedback">
                                                    
                                                </div>
                                            @enderror
                                        </div>
    
                                        <span class="text-sm text-secondary d-block mt-2">Customers won't see this</span>
    
                                    </div>
                                </div>
                            </div>
    
                            <div class="card rounded-lg"
                                 data-controller="inventory">
                                <div class="card-header">
                                    <h4>Inventory</h4>
                                </div>
                                <div class="card-body">
                                    <div class="form-group">
                                        <label class="form-label"
                                               for='sku'>SKU</label>
    
                                        <input id='sku'
                                               form="storeProduct"
                                               type="text"
                                               name="sku"
                                               class="form-control @error('sku') is-invalid @enderror"
                                               value="">
    
                                        @error('sku')
                                            <div class="invalid-feedback">
                                                
                                            </div>
                                        @enderror
                                    </div>
    
                                    <div class="form-group mb-3">
                                        <label class="custom-switch pl-0">
                                            <input form="storeProduct"
                                                   checked
                                                   type="checkbox"
                                                   @checked(old('track_quantity', $product->track_quantity))
                                                   name="track_quantity"
                                                   data-action="input->inventory#toggle"
                                                   class="custom-switch-input @error('track_quantity')
    is-invalid
    @enderror">
                                            <span class="custom-switch-indicator"></span>
                                            <span class="custom-switch-description">Track quantity</span>
                                        </label>
                                        @error('track_quantity')
                                            <div class="invalid-feedback">
                                                
                                            </div>
                                        @enderror
                                    </div>
    
                                    <div class="form-group"
                                         data-inventory-target="checkbox">
                                        <label class="custom-switch pl-0">
                                            <input form="storeProduct"
                                                   @checked(old('sell_out_of_stock', $product->sell_out_of_stock))
                                                   type="checkbox"
                                                   name="sell_out_of_stock"
                                                   class="custom-switch-input @error('sell_out_of_stock')
    is-invalid
    @enderror">
                                            <span class="custom-switch-indicator"></span>
                                            <span class="custom-switch-description">Continue selling when out of stock</span>
                                        </label>
                                        @error('sell_out_of_stock')
                                            <div class="invalid-feedback">
                                                
                                            </div>
                                        @enderror
                                    </div>
    
                                    <div class="form-group"
                                         data-inventory-target="quantity">
                                        <label class="form-label"
                                               for='quantity'>Quantity</label>
    
                                        <input form="storeProduct"
                                               type="text"
                                               name="quantity"
                                               id='quantity'
                                               class="form-control @error('quantity') is-invalid @enderror"
                                               value="">
    
                                        @error('quantity')
                                            <div class="invalid-feedback">
                                                
                                            </div>
                                        @enderror
                                    </div>
                                </div>
                            </div>
    
                            <div class="card rounded-lg">
                                <div class="card-header">
                                    <h4>Variants</h4>
                                </div>
                                <div class="card-body">
                                    
                                </div>
                            </div>
    
                            <div class="card rounded-lg">
                                <div class="card-header">
                                    <h4>Search Engine Optimization</h4>
                                </div>
                                <div class="card-body">
                                    
                                </div>
                            </div>
                        </div>
                        <div class="col-12 col-md-5">
                            <div class="card rounded-lg">
                                <div class="card-header">
                                    <h4>Product status</h4>
                                </div>
                                <div class="card-body">
                                    <div class="form-group">
                                        <select form="storeProduct"
                                                name="status"
                                                class="form-select @error('status') is-invalid @enderror">
                                            <option value="draft"
                                                    @selected(old('status', $product->status) == 'draft')>Draft</option>
                                            <option value="review"
                                                    @selected(old('status', $product->status) == 'review')>Review</option>
                                            <option value="active"
                                                    @selected(old('status', $product->status) == 'active')>Active</option>
                                        </select>
    
                                        @error('status')
                                            <div class="invalid-feedback">
                                                
                                            </div>
                                        @enderror
                                    </div>
                                </div>
                            </div>
    
                            <div class="card rounded-lg">
                                <div class="card-header">
                                    <h4>Product organization</h4>
                                </div>
                                <div class="card-body">
                                    <div class="form-group">
                                        <label class="form-label"
                                               for='category_id'>Category</label>
                                        <select form="storeProduct"
                                                name="category_id"
                                                id='category_id'
                                                class="form-select @error('category_id') is-invalid @enderror">
                                            @foreach ($categories as $category)
                                                @if ($category->id == old('category_id', $product->category->id) || strtolower($category->name) == 'default')
                                                    <option selected
                                                            value=""></option>
                                                @else
                                                    <option value=""></option>
                                                @endif
                                            @endforeach
                                        </select>
    
                                        @error('category_id')
                                            <div class="invalid-feedback">
                                                
                                            </div>
                                        @enderror
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
    
                    <div class="row">
                        <div class="col-12">
                            <div class="form-group text-right">
                                <input type="submit"
                                       class="btn btn-primary btn-lg"
                                       value="Save"
                                       form="storeProduct">
                            </div>
                        </div>
                    </div>
    
                </div>
            </div>
        </section>
    @endsection
    
    

    Next, we edit the UpdateProductRequest to add some validation and authorizations to the request before it reaches the controller

    Edit the UpdateProductRequest to the following

    <?php
    
    namespace App\Http\Requests;
    
    use Illuminate\Foundation\Http\FormRequest;
    
    class UpdateProductRequest extends FormRequest
    {
        /**
         * Determine if the user is authorized to make this request.
         *
         * @return bool
         */
        public function authorize(): bool
        {
            return $this->user()->can('update', $this->route('product'));
        }
    
        /**
         * Prepare input for validation
         *
         * @return void
         */
        protected function prepareForValidation(): void
        {
            $this->merge([
                'track_quantity' =>
                    $this->has('track_quantity') &&
                    $this->input('track_quantity') == 'on',
                'sell_out_of_stock' =>
                    $this->has('sell_out_of_stock') &&
                    $this->input('sell_out_of_stock') == 'on',
            ]);
        }
    
        /**
         * Get the validation rules that apply to the request.
         *
         * @return array<string, mixed>
         */
        public function rules(): array
        {
            return [
                'name' => 'required|string|max:255',
                'description' => 'required|string',
                'sku' =>
                    'sometimes|nullable|string|unique:products,sku,' .
                    $this->route('product')->id,
                'track_quantity' => 'sometimes|nullable|boolean',
                'quantity' => 'required_if:track_quantity,true|nullable|int',
                'sell_out_of_stock' => 'required_if:track_quantity,true|boolean',
                'category_id' => 'required|int|exists:categories,id',
                'price' => 'required|numeric|min:0',
                'cost' => 'sometimes|nullable|numeric',
                'discounted_price' => 'sometimes|nullable|numeric',
                'status' => 'required|string|in:active,draft,review',
                'images' => 'sometimes|nullable|array',
                'images.*' => 'string',
            ];
        }
    }
    

    So on the authorize method we check if the user authorized to update products, we don’t anyone just products if they are not authorized.

    The prepareForValidation method simply turns the input checks (“on”) into real booleans and then your everyday validation on the rules method

    If validation passes let’s make the actual updating in the Admin\ProdocutController.

    Edit the update method and put the following snippet

    
    /**
     * Update the specified resource in storage.
     *
     * @param UpdateProductRequest $request
     * @param Product $product
     * @return RedirectResponse
     * @throws Exception
     */
    public function update(UpdateProductRequest $request, Product $product)
    {
        $product->update($request->safe()->except(['images']));
    
        collect($request->validated('images'))->each(function ($image) use (
            $product,
        ) {
            $product->attachMedia(new File(storage_path('app/' . $image)));
            Storage::delete($image);
        });
    
        return to_route('admin.products.index')->with(
            'success',
            'Product was successfully updated',
        );
    }
    

    First we get the validated fields from the request except the images key and pass that to the update method of the product model

    If there were images uploaded with this request we loop through all of them and then attach them to this product

    Lastly, we return the user to the products index page with a toast message.

    This is all we need to be able to edit products and in the upcoming tutorials we will add the ability to create product variations such as color, size etc

    As I was using the products section of the ecommerce website I noticed a few issues if a user doesn’t include optional fields which we will rectify in the next post

    To make sure you don’t miss the next post in this series subscribe to the newsletter and get notified when it comes out

    Like before, Happy coding!

    Laravel News Links