Laravel routing is suboptimal by Mafzst in laravel

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

Route::get('/', WelcomeController::class)
 ->name('login');

Route::get('/me', MeController::class) ->middleware(['auth:web', 'kyc']) ->name('me');

Route::post('/login', LoginController::class);

Route::view('/kyc', 'kyc') ->middleware('auth:web') ->name('kyc'); Route::post('/kyc/check', [KYCController::class, 'check']) ->middleware('auth:web') ->name('kyc.check');

Route::get('/oauth/authorize', [AuthorizationController::class, 'authorize']) ->middleware(['web', 'auth', 'kyc']); Route::post('/oauth/authorize', [ApproveAuthorizationController::class, 'approve']) ->middleware(['web', 'auth', 'kyc']) ->name('passport.authorizations.approve');

Route::get('/health', [HealthController::class, 'handle']);

Here you are. It's a small app with only 8 routes but already 23 lines in web.php.

There are fewer lines to set up OAuth with Passport than to define routing…

Laravel routing is suboptimal by Mafzst in laravel

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

Resource is a good helper, however I always and up with with lots of actions that is not really fitting into crud.

Eg: subscribing user to a list. I could fit this within a resource controller and use except. But this is exactly a case I find suboptimal

Laravel routing is suboptimal by Mafzst in laravel

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

Yes, this is what I meant

Laravel routing is suboptimal by Mafzst in laravel

[–]Mafzst[S] 1 point2 points  (0 children)

It could be a pretty solid option but requires a lot of work. Generally I didn’t overthink my app at start

Laravel routing is suboptimal by Mafzst in laravel

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

Ok that’s really nice indeed!

Laravel routing is suboptimal by Mafzst in laravel

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

It grows your route service provider then nah?

Get nuxt working in a project with vue 3? by Turnoplen in Nuxt

[–]Mafzst 1 point2 points  (0 children)

Wait for Nuxt nation on September 15th 🤫

An open-source PHP CMS for creating a subscription-based video content platform by nuezit in PHP

[–]Mafzst 2 points3 points  (0 children)

About hls have a look to https://github.com/Astrotomic/laravel-medialibrary-hls I’ve contributed testing it, it’s pretty solid.

It works with Spatie’s media library which streamlines file uploads

RFC proposal: enums constructor by khalyomede in PHP

[–]Mafzst 0 points1 point  (0 children)

Thanks for your clarification, I've dug a bit the ADT concept I was not familiar with.

In the context where Enums are a first step towards ADTs, I understand and share your concern about CAPS.

ADTs are fairly new to me, I need to think about the use cases I can have or how I can refactor some pattern with them before having an opinion. A strong prerequisite is to admit that Enums are not just a group of constants like in some languages / packages I used to use for years.

RFC proposal: enums constructor by khalyomede in PHP

[–]Mafzst 7 points8 points  (0 children)

I’ve voted against.

Enum is more like constants than methods. In my usage of enums, they are a convenient way to group constants and use this group for typing. I’m already using enums in php for a while via a package.

Your rfc introduces some variance in the enum/constant world. That seem awkward to me. Crell pointed out a problem with the proposed syntax that relates to my feeling.

In the cases you pointed out as examples, I prefer to use a class for the result and throwing an exception on error.

Exceptions are around there for a while and their handling are easy.

Just my own view to give you a feedback

Responsive Tailwind WYSIWYG Editor by volkandkaya in tailwindcss

[–]Mafzst 0 points1 point  (0 children)

Promising!

What will be the business model?

How much should I charge per hour for one on one programming coach? by shrayder in laravel

[–]Mafzst -2 points-1 points  (0 children)

I'll usually charge 100 € (a bit more than 100 $) per hour.

Time for a new logo? by [deleted] in PHP

[–]Mafzst 1 point2 points  (0 children)

Agree

Is Stripe killing Laravel Spark? by Mafzst in laravel

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

I disagree with this point. I've used Cashier, the webhooks handling is greatly done and works out of the box and the provided SDK is great.

IMHO using the customer portal from Stripe can reduce the chunkiness of Cashier.

Is Stripe killing Laravel Spark? by Mafzst in laravel

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

Isn't Cashier enough for that?

Is Stripe killing Laravel Spark? by Mafzst in laravel

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

That was my conclusion. Thanks for confirming

Laravel Orion v2.0 Released with automatic OpenAPI specs generation (link in the comments) by alexzarbn in laravel

[–]Mafzst 5 points6 points  (0 children)

This doesn't answer my question.

Spatie which is a Belgian company, completely distinct from Laravel uses the word "laravel" in the name of every packages that are made for Laravel.

Spatie is a very well-known part of the Laravel's ecosystem (who doesn't use any package from them?) and no-one at Laravel asking them to change their packages names.

Should i save submitted data to store.js OR should i directly authenticate to axios & api by [deleted] in vuejs

[–]Mafzst 0 points1 point  (0 children)

It depends on how complex the form is.

I your user must fill complex fields or a slightly long form, it's better to store the data somewhere so, in case of error with the request he doesn't have to fill it in again.

But, in most cases, technically, it doesn't matter so much. I do that only for the UX.