Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Illuminate/Mail/Mailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ public function withSwiftMessage($callback)
public function __call($method, $parameters)
{
if (Str::startsWith($method, 'with')) {
return $this->with(Str::snake(substr($method, 4)), $parameters[0]);
return $this->with(Str::camel(substr($method, 4)), $parameters[0]);
}

throw new BadMethodCallException(sprintf(
Expand Down
2 changes: 1 addition & 1 deletion tests/Mail/MailMailableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function testMailableBuildsViewData()

$expected = [
'first_name' => 'Taylor',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is lastName in CamelCase but first_name isn't?

'last_name' => 'Otwell',
'lastName' => 'Otwell',
'framework' => 'Laravel',
];

Expand Down