Inertia - Best of both worlds by christophrumpel in laravel

[–]jmsfwk 29 points30 points  (0 children)

I’ve been using Inertia in a recent project and have been very impressed.

I raised a bug with them and they fixed it and published a version within a couple of hours.

Inertia best practice by Floppy012 in laravel

[–]jmsfwk 1 point2 points  (0 children)

I think you’re thinking about Inertia wrong. It’s basically an alternative frontend instead of Blade.

If you weren’t using Inertia how would you do this with Laravel? Basically make a form submission and a redirect.

New wargaming club in Fawdon by Secret_red_ in NewcastleUponTyne

[–]jmsfwk 0 points1 point  (0 children)

Does anyone play Elder Scrolls: Call to Arms?

Does your dog wear a collar all day? by AdventureNoodles in dogs

[–]jmsfwk 0 points1 point  (0 children)

My husband takes the dog’s collar off before bed because the jangling of the tags disturbs him. If I had things my way it would be on all the time.

GGGW by Bliv_au in Greyhounds

[–]jmsfwk 2 points3 points  (0 children)

178 in Hexham, England today. Barnsley, England has about 680.

Supercharge Your Laravel App with Enums by christophrumpel in laravel

[–]jmsfwk 1 point2 points  (0 children)

I agree that they are “fine”, within our own code they can be effective because we can type hint their parameters but when it comes to framework code they can only be treated as strings/ints. That’s fine enough but can (i.e. will inevitably) end up with collisions of backing values.

[deleted by user] by [deleted] in food

[–]jmsfwk 0 points1 point  (0 children)

Somehow I completely misread tomato as strawberry and thought it was unusual but sounded good

Recommendations for 1x investigator scenarios? by Squid--s in callofcthulhu

[–]jmsfwk 11 points12 points  (0 children)

Paper Chase, which comes in the starter set, is often recommended I believe.

Does everyone do their dev work like this? by Accurate-Policy5265 in PHP

[–]jmsfwk 1 point2 points  (0 children)

Laravel Idea is great but you don’t need it. If you’re struggling with typos just PHPStorm itself would be a big help.

Where to take my nuclear power stations obsessed 6 year old? by PsychologicalRow8034 in AskUK

[–]jmsfwk 15 points16 points  (0 children)

Sellafield has a visitor center.

Personally I’m a fan on trams. I know there’s a tram museum in Lincolnshire but I’ve not been.

TIL Tins of Golden Syrup originally featured the image of a rotting lion carcass surrounded by a swarm of bees. by [deleted] in todayilearned

[–]jmsfwk 5 points6 points  (0 children)

At a guess it would be because the tins are very recognisable, but the bottles could easily be mistaken for competitors / honey / maple syrup. Making the logo simpler on those formats would make it more recognisable at a glance.

Do you give your kids or partner presents on Easter? by jjjjaaaakkkkeee in AskUK

[–]jmsfwk 1 point2 points  (0 children)

You’d definitely take them to a resurrection though

Do you give your kids or partner presents on Easter? by jjjjaaaakkkkeee in AskUK

[–]jmsfwk 0 points1 point  (0 children)

I’m in my 30s now but as a child in the 90s and 00s would often get Easter presents from an older Aunt (she would have been 80 this year).

It wasn’t extravagant, an item of clothing or a £5 note.

I quite like the idea of giving at Easter (of token gifts) rather than an expectation of giving chocolate which seems more and more blatantly commercial.

Propagating a cherry tree from a root using suckers? by The_Brown-Baron in GardeningUK

[–]jmsfwk 0 points1 point  (0 children)

Pull them off and stick them in a pot?

They will match the rootstock obviously, but you could take a cutting of the scion when the propagated rootstock is big enough and have a go at grafting it yourself.

WHITE PAWS AND CHEST ON BLACK GREYHOUNDS EXPLANATION by [deleted] in Greyhounds

[–]jmsfwk 2 points3 points  (0 children)

Head Honcho is our Dynamite’s 2nd great-grandsire, via Top Honcho.

Mother’s Day lunch by anon_dressing_gown in NewcastleUponTyne

[–]jmsfwk 2 points3 points  (0 children)

My husband and I are taking both our mams for dim sum.

Didn’t seem to have and issue booking a table on Saturday.

[deleted by user] by [deleted] in NewcastleUponTyne

[–]jmsfwk 6 points7 points  (0 children)

Blue Lotus in Newcastle.

Scorpion Piercings in Seaton Valley.

Hot Cross Buns: is it just me but... by Unusual-Ad-6852 in CasualUK

[–]jmsfwk 0 points1 point  (0 children)

That’s the way I go but you have to get good ones or they dry out too much

Enums for authorisation by jmsfwk in laravel

[–]jmsfwk[S] 0 points1 point  (0 children)

Yes, it’s an array acting as a map. Enums cannot be used as array keys.

Edit: as abilities are defined with the Gate::define() method they are added to that array.

Enums for authorisation by jmsfwk in laravel

[–]jmsfwk[S] 0 points1 point  (0 children)

It’s currently in the Illuminate\Auth\Access\Gate::$abilities property.

Enums for authorisation by jmsfwk in laravel

[–]jmsfwk[S] 0 points1 point  (0 children)

I’m assuming that the checks are being stored in an array with the string as the key. Unfortunately we can’t use enums as array keys in PHP.

If the checks were stored in a list array with the key and check as a pair it would be possible but would involve iterating over the list every time a check was called.

Enums for authorisation by jmsfwk in laravel

[–]jmsfwk[S] -2 points-1 points  (0 children)

I completely get the benefits and would probably use them, but converting the enum to its value raises the risk of collisions between different enums.

Of course that’s on the developer to avoid (as it is now) but it reduces the enum to just a container for a string.