This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h2>Request With a Callback Function voorbeeld</h2> | |
<button onclick="clickButton()">Haal token op</button> | |
<p id="response"></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NIKS 18 leeftijd controle. | |
document.title = 'NIKS 18!'; | |
const age = prompt('Wat is uw leeftijd?'); | |
if (age < 18) { | |
// De gebruiker is jonger dan 18 | |
alert('NIKS 18!'); | |
} else { | |
// De gebruiker is 18 of ouder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Voorbeeld</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Staat de onderstaande tag op de goede positie? --> | |
<img src="https://ihate.space/AX6p91I.gif" alt="beschrijving"> | |
</head> | |
<body> | |
<p>html body</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>FilePond from CDN</title> | |
<!-- Filepond stylesheet --> | |
<link href="https://unpkg.com/filepond/dist/filepond.css" rel="stylesheet"> | |
<!-- image preview --> | |
<link href="https://unpkg.com/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css" rel="stylesheet"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validator::extend('youtube', function ($attribute, $value, $parameters, $validator) { | |
return preg_match("/(youtube.com|youtu.be)\/(watch)?(\?v=)?(\S+)?/", $value); | |
}, "Sorry, this doesn't look like a valid youtube URL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make sure to put this at the top of your AppServiceProvider: use Illuminate\Support\Facades\Validator; | |
Validator::extend('youtube', function ($attribute, $value, $parameters, $validator) { | |
preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $value, $matches); | |
return count($matches) > 0; | |
}, "Sorry, this doesn't look like a valid youtube URL"); |