Hasnayeen

@hasnayeen.com

"Everything has a trade-off" Building products with Laravel, Livewire, Alpine, Tailwind, Filament

starting learning #threejs , I know I know llm are really good at it, can write better & faster than me, don't care. started learning things for the fun of it. building things hands-on give such a good experience

Laravel devs, this Collection feature is easy to overlook. 👀 Higher-order messages let you replace simple callbacks with expressive syntax across many Collection methods. Once you spot the pattern, your Collection code gets a lot cleaner.

Bild

Ever add a personal scratch file to .gitignore just to keep git status clean? 👀 Don't change the shared .gitignore for something only you need. Use .git/info/exclude instead. Same ignore syntax. Local to your clone. Never committed.

Bild

Laravel Tip 💡 Need to know what changed on an Eloquent model? Before saving, use isDirty() and isClean(). After saving, use wasChanged(). And when you need the previous value, getOriginal() has you covered. The important part is knowing when to use each one. 👀

Bild

Laravel devs, you asked for it and it's here! 👀 I've started collecting the Laravel tips I've posted on X in one place. Around 100 tips are there so far, and the best part: you can add your own tips too! Let's build the collection together. ❤️ github.com/MrPunyapal/t...

GitHub - MrPunyapal/tips: Collection of tips posted on X by MrPunyapal or contributed by community.

Collection of tips posted on X by MrPunyapal or contributed by community. - MrPunyapal/tips

github.com

blade (and livewire) fans, this one's for you: pint --blade formats blade / html / php, and sorts tailwind classes in your blade files composer update & enjoy 🤌🏻

Bild

say hello to pest v5 · tia: the fastest testing engine in the world (literally instant) · agent plugin: 10x better than any other browser agent · phpstan + rector: built in · evals: test your agents ship it

Laravel Installer v5.31 includes a new command: 𝚕𝚊𝚛𝚊𝚟𝚎𝚕 𝚙𝚊𝚌𝚔𝚊𝚐𝚎 This new command kicks off an interactive prompt that scaffolds out a Laravel package using our (new) (official) package skeleton: github.com/laravel/pack... Enjoy!

laravel package command showing inputs for package name and author name

Trying to read more long form contents so decided to make a little rss feed reader app with filament. I fell in love with @filamentphp.com every time I work with it. P.S I need more rss feed recommendation, particularly on tech, php please.

Screenshot post list page of feed reader appScreenshot of post details slide

Laravel tip: If you update records while chunking them, be careful with `chunk()`. Because `chunk()` uses offset pagination, changing the result set during processing can make you skip rows. Use `chunkById()` when the records can change while processing.

Bild

🔒 You can now password-protect generated PDFs natively in spatie/laravel-pdf. It uses AES-256 and runs in pure PHP, no external binaries like qpdf are needed. So it'll also work on Laravel Cloud.

Code snippet demonstrates how to password-protect a PDF using Laravel with AES-256 encryption.