Refactoring on both Angular and Laravel side