JavaScript Refresh – Program Structure

Expressions and statements A fragment of code that produces a value is called an expression. Expressions can contain other expressions. true l false 1 “hello” 2×5 Math.min((2+6),4) Statements Statements are one or multiple expressions with a semicolon after it. A program is a list of statements. Statements are made up of expressions. This is a … Read more

JavaScript Refresh – Values, Types, and Operators

Values 18 “hello” true Numbers .18 1.8 18 18000000000000000000 Infinity -Infinity Strings “hello” ‘hello’ `hello` “hello” + “hello” = “hellohello” template literals: `half of 100 is ${100 / 2}` Operators (Unary, Binary, Ternary) 2 * 3 3 / 2 10 % 4 3 + 4 3 – 4 -4 typeof “something” ! 3 < 4 3 … Read more

PHP Refresher 1

Types PHP supports ten primitive types: bool, int, float,  string, array, object, callable, iterable, resource, and NULL. class ManyTypes { private $isObject = true; // bool private $myAge = 10; // int private $nationalDebt = 20000000000000.25; // float public $languages = [ ‘php’, ‘JavaScript’, ]; public function getMyAge() { echo “I am $this->myAge years old”; … Read more

Model Relationships

Below the properties, we have a couple functions. The first function describes a relationship between a note and a user. If a table has a field that has _id, the first part refers to another database table. In this case, it’s referring to the user table. Since the notes table has this field, it means … Read more

DevOps – Bonus Lesson: MySQL Docker Service

Add the following block of code to the bottom of the docker-compose.yaml file. This will give you a MySQL database for your application. Note that indentation is very important. Always refer to this block of code instead of the snippets since the snippets aren’t properly indented. # Database database: image: mysql:8.0 command: –default-authentication-plugin=mysql_native_password volumes: – … Read more

Creating the Laravel Application

We’re going to learn Laravel by walking through the user story. The user story parts will be underlined. You can view all of the code for this course on git: https://github.com/davidrichied/laravel-notes. The user goes to the home page of the website and sees a button that says Create Note. Routes First of all, how does … Read more