Difference between service & trait in Laravel
Assume I have a class which handles image uploading on my application Should I write it as service or trait ? when i should use service and trait ?
Assume I have a class which handles image uploading on my application Should I write it as service or trait ? when i should use service and trait ?
A service is a class that will be called during your file manipulation.
A trait is an extension of a class, that you can incorporate in other classes.
The choice is yours, I hope I understood you well. Sincerely