mbg22 liked a comment+100 XP
4d ago
One can make the argument that it truly doesn't matter how complicated the code is, since the AI will fix whatever may be wrong with it. Personally, I'm a control freak like you and I want to know everything that's happening in "my" code. But philosophically speaking, this need for control is a relic of the pre-AI age. Beautiful, elegant, efficient code will all eventually be sacrificed at the altar of the AI's effectiveness and efficiency, which is a pity, because these are the strengths of Laravel
mbg22 liked a comment+100 XP
4d ago
I think coding used to be fun without AI. The joy of developing each feature by typing code and thinking each step will be missing in the future.
mbg22 liked a comment+100 XP
2w ago
I strongly disagree on removing the type hinting. You shouldn't have to extrapolate from the code in the function what to pass it and what you'll get back. By removing these type hints you're doing the exact opposite of your stated goal for this lesson.
The type hinting reduces the cognitive overhead of determining parameter and return types, which is especially useful in large and complex applications, which are where reducing cognitive overhead matters the most. Further, it reduces programmer error and enables modern IDEs to offer better inspections to catch errors while writing.
mbg22 liked a comment+100 XP
5mos ago
@Bionik6 my solution with Laravel 11
bootstrap/app.php file:
...
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
api: [// <-- we can use an array here
__DIR__.'/../routes/api.php',
__DIR__.'/../routes/api_v1.php',
],
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
...
and inside api_v1.php file:
...
Route::prefix('v1')->group(function () {
Route::apiResource('tickets', \App\Http\Controllers\Api\V1\TicketController::class);
});
...