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

Correction: Update basic-usage.md Selecting a driver" section #280

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

PrabalPradhan1991
Copy link
Contributor

Correction on Selecting a driver example

  • using the previous command
Image::useImageDriver(ImageDriver::Gd)->loadFile(string $pathToImage);

gave me following errors

  1. Non static method 'useImageDriver' should not be called statically.
  2. Undefined method 'loadFile'
  3. undefinedType ImageDriver
  • The correct command is as follows:
Image::load($file)->useImageDriver('imagick')

## Correction on Selecting a driver example

- using the previous command
```php
Image::useImageDriver(ImageDriver::Gd)->loadFile(string $pathToImage);
```
gave me following errors 
1. Non static method 'useImageDriver' should not be called statically.
2. Undefined method 'loadFile'
3. undefinedType ImageDriver
@PrabalPradhan1991 PrabalPradhan1991 changed the title Update basic-usage.md Correction: Update basic-usage.md Selecting a driver" section Dec 11, 2024
@freekmurze freekmurze merged commit 2fb420a into spatie:main Dec 11, 2024
1 check passed
@freekmurze
Copy link
Member

Thanks!

@PrabalPradhan1991
Copy link
Contributor Author

Thanks!

Sorry turns out I was using v2, my changes are only applicable for v2.

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