Personally, I think the desired behavior would be to merge the two directories - which would have the contents of the new directory clobber the old directory, which should be a bit more straightforward programmatically.
But honestly, I think _duplicating_ the file table in MySQL seems redundant. With the S3 library you can list out the contents, I think my approach would be to make your API a wrapper for that and try and dispense with the MySQL table abstraction.
Posts in r-laravel category