A couple of years ago we have worked on a project for a branch of financial institution, to track and generate reports on sales and activity of advisors. The HQ of the financial institution would produce weekly reports in excel format, the branch wanted to have something more visual and exciting then a chart of numbers…
So the web app we built has import function to import the excel report data into the database. The second part of the web app is to take this data and display nice reports with graphs comparing month to month and year to year in visually appealing manner.The web app was built with old version of Yii PHP framework backend and angular.js based front end. Over time more functions were added:
PDF generation
Weeks since last sale
emailing reports
etc…
All was great, except the developer who built this doesn’t work for us anymore, and none of us particularly like / specialize in Yii. Another issue that we noticed is something that happens to projects that starts small, but then continuously add functions, some of the original architecture decisions were hurting us. So we made a decision that its better to “bite the bullet” now and rebuild it in a framework that we know and is vastly more popular today than continue with a framework we don’t know that well and have no experience working with, plus we will have an added benefit of having a fresh start while now understanding the full scope of the project much better. The front end wouldn’t need full reworking since angular works equally well with both PHP frameworks.
In Laravel creating a new table schema is handled by Migrations. The migrations are really well documented here, but lets just quickly go through the steps:
Step 1 – create migration: php artisan make:migration createadvisorstable --create=advisors After its done open the created file and add the fields that you require
Here what our file looked like: