14
ultrono
8y

Gahhhh!

Just inherited a HR backend written in Laravel. However, ALL database interaction is done using DB::raw() i.e.

$results = DB::select( DB::raw("SELECT * FROM tbl WHERE col = '$fromThe QueryStringLOl'") );

No models at all :(

FML.

Comments
  • 0
    Good luck!
  • 0
    Kill::it('DbRawStatements')->with('fire');
  • 2
    Back in the days at my old workplace we used Codeigniter and one guy put mysql_query stuff to view. I told him about MVC and why its bad to put that kind of stuff to a view. Month later I reviewed his code again and no more sql stuff in the view. Great.

    I checked the models folder and it had one file called generalModel.php. Need I say more? 😭
Add Comment