Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

1mo ago

Laravel From Scratch (2026 Edition): Ep 42, Deploy And Then Implement A Feature Request

** Warning **

Do not just use ->markdown() on its own this is prome to XSS (Cross-Site-Scripting) if you was to put <img src="#" onmouseover="alert('hacked');" /> in your idea description or worse a user was, when they hover over the image, an alert will show. Instead use:

    `return Attribute::get(
        fn ($value, $attributes) => new HtmlString(str($attributes['description'])->markdown([
            'html_input' => 'escape',
            'allow_unsafe_links' => false,
            'max_nesting_level' => 5,
        ])));`
SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

1mo ago

Laravel From Scratch (2026 Edition): Ep 38, Authorization Is A Requirement

Thanks @marc_meat! 🙌🏻 After investigating, I confirmed that this is indeed the error. I found a possible workaround without modifying the Composer fork: dynamically setting the enctype with Alpine.js only when the user selects an image:

x-bind:enctype="hasImage ? 'multipart/form-data' : false"

This way, the form is submitted without multipart/form-data by default, and the browser test passes, but when the user selects an image, it changes automatically. I hope this helps!

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

1mo ago

Laravel From Scratch (2026 Edition): Ep 38, Authorization Is A Requirement

Is anyone else having this problem?

FAILED Tests\Browser\CreateIdeaTest > it creates a new idea
Failed asserting that an array has the key 'title'.

... I've checked everything over and over and I still can't figure out what's wrong!

SarwarAhmed's avatar

SarwarAhmed wrote a comment+100 XP

1mo ago

Laravel From Scratch (2026 Edition): Ep 36, Upload Featured Images To Storage

@Alext1926

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

2mos ago

Laravel From Scratch (2026 Edition): Ep 25, Tailwind Theme Setup And Initial UI

Here are the full CSS component files for those looking to copy:

resources/css/components/btn.css

resources/css/components/form.css

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

3mos ago

Laravel From Scratch (2026 Edition): Ep 23, Final Project Setup

@nosthas

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

3mos ago

The Laracasts Snippet: Ep 9, Most People Have No Clue How to Get a Programming Job

@willtomlinson Putting effort into getting the job you want is absurd? What are you talking about?

Do you really want to entertain the possibility that the 15 year old bus boy is putting more time and effort into getting a job than you? He/She has to:

  • 1 hour: Shower, look presentable.
  • 30 minutes: Travel to/from restaurant.
  • 20 minutes: Fill out application.
  • 10 minutes: Wait for manager to call you in.
  • 20 minutes: Interview with manager.

We're already at 2.5 hours. What do you think @willtttomlinson? Should you spend 2.5 hours applying for a six-figure job that you'll be at for potentially years?

SarwarAhmed's avatar

SarwarAhmed liked a comment+100 XP

4mos ago

Laravel 12 react starter kit disable register page

You can also remove the register routes

You SHOULD also