Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Fix directory for nested markdown files for mailables #41366

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

ahinkle
Copy link
Contributor

@ahinkle ahinkle commented Mar 6, 2022

This PR allows for the correct location on nested markdown mailables. Useful for applications with many mailables.

Currently, if you create a mailable with a nested location, it will generate a mailable class in the nested directory. However, the markdown will be in the mail directory and not within the nested directory.

php artisan make:mail Registration/WelcomeEmail -m

// generates:
app\Mail\Registration\WelcomeEmail.php
resources\views\mail\welcome-email.blade.php

This PR will place the blade in the proper nested directory.

Proposed:

php artisan make:mail Registration/WelcomeEmail -m

// generates:
app\Mail\Registration\WelcomeEmail.php
resources\views\mail\registration\welcome-email.blade.php

of course, you can manually override the location with --markdown=(location) but this fixes the directory when an empty markdown location is provided.

I didn't see any tests for this but I tested this thoroughly locally. Thanks!

@GrahamCampbell GrahamCampbell changed the title Fix directory for nested markdown files for mailables [9.x] Fix directory for nested markdown files for mailables Mar 6, 2022
@taylorotwell taylorotwell merged commit b7625b3 into laravel:9.x Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants