for one of my projects I want to disable the automatic team photo cropping to 300x300px. I found the corresponding method call in /spark/src/Interactions/Settings/Teams/UpdateTeamPhoto.php:
I course I should not update the file in this location, but I honestly have no idea where to change. There is another match in the vendor directory, which is also a bad thing.
Could you please help me what to do? Do I need to copy the file?
You may alter, modify, or extend the Software for your own use, or commission a third-party to perform modifications for you, but you may not resell, redistribute or transfer the modified or derivative version without prior written consent from Laravel LLC.
You can copy the entire files and make modifications to suit your use case.
Thank you for the quotation. Do you know if there is any other possibility to disable the image cropping?
And to which location do I need to copy the file in order to replace the one in the source directory?
In Sparks service provider, in the register() method - just register/bind your own class to replace the native one.
$this->app->singleton(
// when this native Spark class is called
'Laravel\Spark\Contracts\Interactions\Settings\Profile\UpdateContactInformation',
// give this class instead
'App\SparkExtensions\UpdateContactInformation'
);
Just copy the original file to a new location and edit it how you need, and instruct Laravel to use your custom class instead. Then you haven't touched the original class and Spark will update normally without overriding your custom changes.