dmitrybubyakin / nova-medialibrary-field

Laravel Nova field for managing the Spatie media library
MIT License
262 stars 62 forks source link

Adding a default image #143

Open petarthewizard opened 2 years ago

petarthewizard commented 2 years ago

I am integrating this field into a project of mine but I need to be able to set a default image for when someone deletes the current images or creates a model without an image. My guess is that this shouldn't be too difficult to implement, maybe I can do a pull request but I've downloaded the code and installed the dependencies but when I run ./vendor/bin/phpunit it doesn't run all the tests but it shows me the options and when I provide it with a filename like one from the tests folder it fails with PDOException: could not find driver - I guess it's just that I am doing something wrong rather than actually the tests failing but I am not sure what, do I need to configure something else before running the tests. If you could point my in the right direction in running the tests I'll do my best to make a PR.

bilogic commented 2 years ago

I think it's a duplicate of #126

dmitrybubyakin commented 2 years ago

@petethewizard PDOException: could not find driver - I think it means you don't have sqlite or mysql PDO driver installed.

petarthewizard commented 2 years ago

@dmitrybubyakin you are right, I didn't have the sqlite driver installed.