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

Workbench Improvements #1

Merged
merged 6 commits into from
Dec 29, 2023
Merged

Workbench Improvements #1

merged 6 commits into from
Dec 29, 2023

Conversation

crynobone
Copy link
Contributor

No description provided.

crynobone and others added 6 commits December 29, 2023 15:18
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
Signed-off-by: Mior Muhammad Zaki <[email protected]>
{
parent::setUp();

$this->app->view->addLocation(__DIR__.'/TestSupport/Views');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now can be auto-discovered if we use workbench/resources/views and update testbench.yaml:

discovers:
  views: true


Route::get('download-pdf', function () {
return pdf('test')->download('my-custom-name.pdf');
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Automatically available within tests and can be previewed using composer run serve, registered to Testbench via testbench.yaml:

discovers:
  web: true

@freekmurze freekmurze merged commit ab16cd0 into spatie:main Dec 29, 2023
1 check passed
@freekmurze
Copy link
Member

Very cool stuff, thanks!

@crynobone crynobone deleted the workbench branch December 29, 2023 08:44
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.

2 participants