Results: 1022
Template literal syntax uses dollar sign
$
followed by curly brackets
${expression}
let name = 'George'
let age = 25

document.write(`My name is ${name} and I am ${age} years old!`)
With quotes:
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; // &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;
Without quotes:
$new = htmlspecialchars("<a href='test'>Test</a>");
echo $new; // &lt;a href='test'&gt;Test&lt;/a&gt;
The second parameter possible values:
ENT_COMPAT
- Will convert double-quotes and leave single-quotes alone.
ENT_QUOTES
- Will convert both double and single quotes.
ENT_NOQUOTES
- Will leave both double and single quotes unconverted. The default is ENT_COMPAT
Makes model called
Post
php artisan make:model Post
With the following basic content
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Post extends Model
{
    //
}
Creates
Post
model and also migrations to create table for the model
php artisan make:model Post -m
The migration file location is
database/migrations/2020_09_02_041219_create_posts_table.php
controller returns plain text & HTML & view
Returns plain text
public function contact() {
        return 'Under Construction';
}
Returns HTML
public function about() {
        return '<h1>About the site</h1>details...';
}
Returns view located at
resources/views/pages/services.blade.php
public function services() {
        return view('pages/services');
}
Cache credentials
Sets the cache timeout for 3600 seconds
git config --global credential.helper 'cache --timeout=3600'
Select every Nth row
Selects every 5th row of
sdt_prices
table
SELECT *
FROM ( 
    SELECT @row := @row +1 AS rownum, sdt_prices.*
    FROM (
        SELECT @row :=0) r, sdt_prices where token_id = 1 order by id desc
    ) ranked
WHERE rownum %5 = 1
Deletes manually set default license (default license will become
ISC
)
npm config delete init-license
Deletes manually set default author name (default author will become empty string)
npm config delete init-author-name
Appends the content to the specified file if it exists (if the file does not exist, the function creates the file and writes the content)
file_put_contents($filePath, $content, FILE_APPEND);
Note: if
FILE_APPEND
parameter is not passed, the function overwrites the content.
Main properties / parameters that the file includes:
name
- name of the app (default is the name of the current folder)
version
- version of the app (default is 1.0.0 - major.manor.patch)
description
- short description for the project
main
- entry point - main JS file
keywords
- keywords that the app is related to
author
- project author
license
- default is ISC (Internet Systems Consortium)
.class1 .class2 h2{
    color: red;
}
Selects all
<h2>
elements within
.class2
that is a descendant of
.class1
element
Results: 1022