Frontend "https://github.com/DanSnow/vue-recaptcha"
-
npm install --save vue-recaptcha
-
form
<my-form inline-template>
<form action="{{ route('...') }}" @submit.prevent="FormSubmit($event)">
// other inputs
<?php | |
/** | |
* Register custom rest fields | |
*/ | |
add_action( 'rest_api_init', 'register_custom_fields' ); | |
/** | |
* Register rest fields and endpoint | |
* |
<?php | |
Blade::directive('route', function ($expression) { | |
return '<?php route(' . $expression . '); ?>'; | |
}); |
Frontend "https://github.com/DanSnow/vue-recaptcha"
npm install --save vue-recaptcha
form
<my-form inline-template>
<form action="{{ route('...') }}" @submit.prevent="FormSubmit($event)">
// other inputs
let cssImport = require('postcss-import') | |
let cssNext = require('postcss-cssnext') | |
let glob = require('glob-all') | |
let mix = require('laravel-mix') | |
let purgeCss = require('purgecss-webpack-plugin') | |
let tailwind = require('tailwindcss') | |
mix.js('resources/assets/js/app.js', 'public/js') | |
.postCss('resources/assets/css/app.css', 'public/css/app.css', [ | |
cssImport(), |
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
function promiseMap(inputValues, mapper) { | |
const reducer = (acc$, inputValue) => | |
acc$.then(acc => mapper(inputValue).then(result => acc.push(result) && acc)); | |
return inputValues.reduce(reducer, Promise.resolve([])); | |
} | |
/* Example */ | |
const axios = require('axios'); |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class GoogleDriveServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap the application services. |
There is no way to store an empty object/array/null value. | |
There are also no actual arrays. Array values get stored as objects with integer keys. | |
(If all keys are integers, it will be returned as an array.) | |
Basically, it's one giant tree of hashes with string keys. | |
Simply write a value to any location, and the intermediary locations will automatically come into existance. | |
── Classes ── | |
DataSnapshot : Container for a subtree of data at a particular location. |
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |