laravel2026 wrote a comment+100 XP
2mos ago
This course seems to utilize v10.x not :latest
Useful but makes it hard to follow/code along.
laravel2026 wrote a comment+100 XP
2mos ago
Having an issue with the 'it shouws courses by released_at' test. Event though the code matches the repo source code, the assertSeeTextInOrder() fails.
When I dd the two created Courses they seem to have the same timestamp.
When I log the Carbon calls I see the dates are correct but they show up on the page as the same.
Any thoughts?
Turned out that I had $date as a parammeter and $data as what was being inserted.
laravel2026 wrote a comment+100 XP
2mos ago
Laravel v13 Tests are failing after implementing scopeReleased. I get App\Models\Course::scopeReleased(): Argument #1 ($query) must be of type Illuminate\Database\Eloquent\Builder, Illuminate\Database\Eloquent\Builder given.
All the code matches the repo source code. Any thoughts?
Docs show this a the way in v10 but has changed since.
laravel2026 wrote a comment+100 XP
2mos ago
After this video my tests and direct browser interactions fail regarding steps.
When creating I see an array of the step as expected
[{"description":"step 1", "completed": false}]
dd($request); in the store method returns
- request:
#parameters: array:6 [
"_token" => "string",
"title" => "test",
"status" => "pending",
"description" => null,
"image" => null,
"steps" => array:1 [
0 => array:2 [
"'description'" => "Step 1", <-- Why the single quotes inside the double quotes?
"'completed'" => "0"
]
]
]
dd($request->validated()); after the dump call returns
array:4 [
"title" => "test",
"description" => null,
"status" => "pending",
"image" => null
]
What happen to the steps? Does validating drop data that fails? No validation errors are returned.
laravel2026 wrote a comment+100 XP
2mos ago
When I click the download button I am redirected to a streaming video even though I am logged in.
laravel2026 wrote a comment+100 XP
2mos ago
How do I test this?
When I manually interact with the web page, it works. When I run the tests they all fail. It seems $request is not passed as using debug() shows title & status as required. Using dd() through the browser shows it sent. If I remove the enctype="multipart/form-data" line, the pest tests again pass.