Bulat liked a comment+100 XP
1mo ago
Thanks @marc_meat! 🙌🏻 After investigating, I confirmed that this is indeed the error. I found a possible workaround without modifying the Composer fork: dynamically setting the enctype with Alpine.js only when the user selects an image:
x-bind:enctype="hasImage ? 'multipart/form-data' : false"
This way, the form is submitted without multipart/form-data by default, and the browser test passes, but when the user selects an image, it changes automatically. I hope this helps!
Bulat liked a comment+100 XP
1mo ago
These videos go way too fast to code along. From now on I’ll just watch them instead of coding together with you.
Bulat liked a comment+100 XP
2mos ago
I just saw that its corrected directly in the next episode. https://laracasts.com/series/laravel-from-scratch-2026/episodes/38
Bulat liked a comment+100 XP
2mos ago
The tests look incomplete to me. Neither image nor steps are tested. I also think that's why the tests are still green.
I would expect the DB transaction to also have $attributes parse to it, and not only $data.
I'm I wrong here?
Bulat liked a comment+100 XP
2mos ago
Just a quick notice, there seem to be a few video glitches between 3:44 and 4:00. It doesn’t take away from the overall value of this excellent series though. Thanks for the great content!
Bulat liked a comment+100 XP
2mos ago
Bulat liked a comment+100 XP
2mos ago
@MassiV Still my go-to insult. I especially use it with my kids =D
Bulat liked a comment+100 XP
2mos ago
icons/close.blade.php
<svg {{ $attributes }} width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="Close">
<path d="M18 6 6 18"></path>
<path d="m6 6 12 12"></path>
</svg>
Bulat liked a comment+100 XP
2mos ago
Thank you for the lessons Jeremy, I really enjoy your teaching style and sense of humor!
I was thinking we could prevent the default submit behavior of the form itself as an alternative to looping and disabling each element. And setting the opacity once on the form element too?
Ahh, but I suppose the user could still edit values which is what you were guarding.
Or maybe it'd make sense to just hide the settings altogether until the game ends (run out of attempts or quit).
Like you said, there's multiple ways to approach these things and I learned about a new way of iterating through form elements, nice!
Thank you :)
Bulat liked a comment+100 XP
2mos ago
@orphanedrecord Thanks!
That was the primary purpose of this exercise. To learn how to iterate through the form controls. Otherwise, yes, there are other (arguably better) ways of achieving the same thing.
Bulat liked a comment+100 XP
2mos ago
Thank you for the great and amusing way of teaching :)
Another method I used to use in the very early days to explore the DOM is the for .. in loops!
Something like ...
const els = document.forms[0].elements for (el in els) { if (typeof(els[el]) == 'object') { els[el].disabled = true } }
Bulat liked a comment+100 XP
2mos ago
please check the summary of the video, not corresponding to this lesson.
Bulat wrote a comment+100 XP
2mos ago
For people who might looking for form html check the source code and copy!
Bulat liked a comment+100 XP
2mos ago
Bulat liked a comment+100 XP
2mos ago
I think you can try to use a more useful resource icons set like material icons that can be easely installed using Fontosource and give you a great collection of icons very ease to use. Thanks a lot Jeffrey!
Bulat liked a comment+100 XP
2mos ago
arrow-back.blade.php
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-arrow-left-icon lucide-arrow-left">
<path d="m12 19-7-7 7-7" />
<path d="M19 12H5" />
</svg>
Bulat liked a comment+100 XP
2mos ago
external.blade.php
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-external-link-icon lucide-external-link">
<path d="M15 3h6v6" />
<path d="M10 14 21 3" />
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
</svg>
Bulat liked a comment+100 XP
3mos ago
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnUnionTypeRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withPaths([
__DIR__.'/app',
__DIR__.'/bootstrap',
__DIR__.'/config',
__DIR__.'/public',
__DIR__.'/resources',
__DIR__.'/routes',
__DIR__.'/tests',
])
->withSkip([
__DIR__.'/bootstrap/cache',
__DIR__.'/storage',
__DIR__.'/vendor',
AddClosureVoidReturnTypeWhereNoReturnRector::class,
ReturnTypeFromStrictTypedCallRector::class,
ReturnUnionTypeRector::class,
DeclareStrictTypesRector::class => [
__DIR__.'/resources/views',
],
AddArrowFunctionReturnTypeRector::class,
])
->withPhpSets()
->withSetProviders(LaravelSetProvider::class)
->withImportNames()
->withComposerBased(laravel: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
)
->withRules([
DeclareStrictTypesRector::class,
]);
Bulat wrote a comment+100 XP
3mos ago
9:39 'user_id' => Auth::user()->id,
Bulat wrote a comment+100 XP
3mos ago
@larsb-dev I want it too!haha
Bulat liked a comment+100 XP
4mos ago