I would suggest as a beginner using a DB query builder/wrapper. Eloquent is a nice option but is probably overpowered. Here is one I found randomly, haven't had a chance to validate it works or anything but: https://clancats.io/hydrahon/v1.1.6/
A DB wrapper (should) handle prepared statements for you, sanitizing inputs and generally makes development much easier. It's much less common to see RAW queries in 2019
A DB wrapper (should) handle prepared statements for you, sanitizing inputs and generally makes development much easier. It's much less common to see RAW queries in 2019