Skip to content

u/Tontonsb

In this archive from Nov 2018 to Dec 2026

54
posts
1.6k
comments
10
media
5.7k
score
8 saved before deletion

Why is Claude piling a decision history in docs and comments?

Here's an example. Claude changed nav to div and wanted to add this comment: html <!-- a div, not a <nav>: role="tablist" would override the landmark anyway --> Something like that might be useful in some very rare cases where the decision is really non-standard. But sometimes it feels like it's goi...

17 points19 comments
Open on Reddit

OOP is a code smell

Over multiple recent discussions I've read that static methods are a code smell and that using them for pure functions is a hacky workaround for autoloading issues. You know what's also a code smell? Using classes and objects when you're not modelling any entity by them. Look at a controller, what d...

0 points82 comments
Open on Reddit

[Internals] PHP won't get extendable enums, but the PHP internals discussions are moving to reddit

Edit & PSA: This was a joke report for April Fools' Day In the allow extending enum internals discussion someone brought up that it would be useful to extend enums. This was rejected as a BC break as it would sometimes allow us to rewrite our crashing code to make it crash with a different error mes...

57 points24 comments
Open on Reddit

How to validate the POSTed array?

My API accepts an array, e.g. [ {"name": "Rex"}, {"name": "Tod"} ] The business requirement is that the length of this array must be between 1 and 100. Is it possible to apply a set of validation rules to the top level array? It appears that '' => 'array|min:1|max:100' applies to nothing and '' => '...

2 points4 comments
Open on Reddit

A package for full page caching

Few years ago I made a small package for full page caching. Recently I needed such caching in a new project and to my surprise it still worked just as fine. I added a feature that I needed now and it serves me very well once again. Now this piece is not tested and I make no promises on maintaining i...

4 points1 comments
Open on Reddit

How to use belongsToMany with Nova?

I have my Article and Category models. They have the relationship defined: // app\Models\Article.php public function categories() { return $this->belongsToMany(Category::class); } // app\Models\Category.php public function articles() { return $this->belongsToMany(Article::class); } Now I'm trying to...

1 points6 comments
Open on Reddit

Hacktoberfest projects

Hey, everyone! Now that Hacktoberfest rules are updated so that repositories have to opt in, it's harder to find projects that I am interested and able to contribute to. Of course, I can create PRs on my own projects, but that kind of defeats the spirit of the project. Maybe we could share our own L...

2 points7 comments
Open on Reddit

Tried out Jetstream. Won't be using it again until a serious overhaul and dropping of Tailwind.

So, I had my first real project in the new Laravel. Fortify is good. But the frontend scaffolding has become useless for me. I was planning to use Vue on the project, so I selected the Inertia stack. The routes file was unfamiliar, the views were split over everywhere. I understood there's too much...

51 points144 comments
Open on Reddit

lang vs __

It appears that the default templates are full of {{ ('Welcome') }}. To me the run of punctuation characters looks as friendly as JavaScript's ;(() => {});, I tend to use @lang('Welcome'). Which syntax do you use in the blade templates?

12 points13 comments
Open on Reddit

PHP without Laravel is so much worse

Sometimes I have to work in other frameworks or plain PHP projects. I see so much of the Laravel tools either missing or underdeveloped. I even tend to implement some of those myself. I've copied a couple of string or array helpers everywhere, I've implemented Laravel-like get and set on models in Z...

0 points22 comments
Open on Reddit

Is there a replacement for folklore/image?

I was using the folklore/image package in multiple projects. It's abandoned for the past few years... I managed to get it working in 5.8 some time ago, but by now it's too outdated. Is there a direct replacement? Or a replacement that could do it with some additional legwork? It worked like this: Yo...

2 points6 comments
Open on Reddit

This community is awesome!

I somehow hadn't noticed anything special about this community, but this thread today is so overwhelmingly positive... https://www.reddit.com/r/laravel/comments/hwf76b/failed_a_laravel_coding_exercise_for_a_job/ Everyone is so helpful and polite. OP is keen and takes every comment well even the one...

85 points19 comments
Open on Reddit

This really annoys me lately...

If you have two (or more) models that have attributes relying on relation with the other model, the model can't be serialized, it takes manual tinkering each time. class Group extends Model { protected $appends = ['deletable']; public function members() { return $this->hasMany(Member::class); } publ...

2 points19 comments
Open on Reddit

Made another tiny package

We are continuing our experiments with encapsulating the smallest features in tiny packages. The goal of our research is to understand how feasible it is to split a project into tiny packages, what benefits it brings and how large is the work overhead. So here I am sharing another package (this was...

0 points3 comments
Open on Reddit

Made a small encryption/hasing package

Hi, We are experimenting with encapsulating tiny features in separate packages. I wanted to share with you one such package. Encrypted is a package that provides a couple of simple custom casts for Eloquent models. php <?php namespace App; use Illuminate\Database\Eloquent\Model; use Crudly\Encrypted...

6 points5 comments
Open on Reddit

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.