attach() returns void which means its result will always be evaluated as false in conditional statement.
If something is wrong with attaching, an exception will be thrown.
Why you need to check for success/error? On success, your code will continue executing. On error, an exception will be thrown. You may catch the exception and do whatever you like, or rely on Laravel exception handler.