Whenever I work on a new branch, I find it useful to have a unique table for the branch and for my testing purposes. Lets assume we have three tables denoted in our `.env` file like that: DB_CONNECTION = mysql_local DB_DATABASE = mastertable DB_DATABASE_BRANCH = branchtable DB_DATABASE_TEST = testtable
Lets take a look at the following table (the quotation marks “…” only indicate that we have a string).
Most scenarios are covered by a hasOne, hasMany or ManyToMany relation. How to use them is explained in detail here. I give a brief overview how they are connected to the database. User hasOne Phone You should have two tables that look somehow like this: From the user class you can access his phone as […]
Locking and transactions helps to write programs where multiple user may do simultaneous request. Lets checkout some common scenarios and how to handle them. Single Statements Two single queries will never be executed parallel. If you call