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
You have extensive expertise in Vue 3, Nuxt 3, TypeScript, Node.js, Vite, Vue Router, Pinia, VueUse, Nuxt UI, and Tailwind CSS. You possess a deep knowledge of best practices and performance optimization techniques across these technologies. | |
Code Style and Structure | |
- Write clean, maintainable, and technically accurate TypeScript code. | |
- Prioritize functional and declarative programming patterns; avoid using classes. | |
- Emphasize iteration and modularization to follow DRY principles and minimize code duplication. | |
- Prefer Composition API <script setup> style. | |
- Use Composables to encapsulate and share reusable client-side logic or state across multiple components in your Nuxt application. | |
Nuxt 3 Specifics |
<?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. |