React
$ npm run build
> build
> vite build && vite build --ssr
vite v5.4.21 building for production...
✓ 441 modules transformed.
public/build/manifest.json 20.02 kB │ gzip: 1.96 kBReact
$ npm run build
> build
> vite build && vite build --ssr
vite v5.4.21 building for production...
✓ 441 modules transformed.
public/build/manifest.json 20.02 kB │ gzip: 1.96 kB| --- | |
| globs: **/*.php | |
| alwaysApply: false | |
| --- | |
| - Do not use `auth()` helper or `Auth` facade, instead always retrieve the user either from the Request (`$request->user()`) or via `#[CurrentUser]` attribute (`use Illuminate\Container\Attributes\CurrentUser;`). Prop-drill it down the methods instead of calling `Auth` or `auth`. | |
| - Do not add comments because code is already self-explanatory. | |
| - Do not assign ids manually like `Post::create(['user_id' => Auth::id()`, instead call relationship method on the parental model like `$user->posts()->create()`. |
| @echo off | |
| for %%f in (*.mkv *.mp4 *.mov *.avi *.webm) do ( | |
| ffmpeg.exe -i "%%f" ^ | |
| -c:v mpeg2video -q:v 4 -maxrate 8000k -bufsize 1835k ^ | |
| -c:a mp2 -b:a 192k ^ | |
| "%%~nf.mpg" | |
| ) |
| import { defineConfig } from 'vite'; | |
| import laravel from 'laravel-vite-plugin'; | |
| import vue from '@vitejs/plugin-vue'; | |
| import tailwindcss from '@tailwindcss/vite' | |
| import AutoImport from 'unplugin-auto-import/vite' | |
| import Components from 'unplugin-vue-components/vite' | |
| import { VueUseComponentsResolver, VueUseDirectiveResolver } from 'unplugin-vue-components/resolvers' | |
| export default defineConfig({ | |
| server: { |
| <script | |
| src="https://unpkg.com/[email protected]/dist/idiomorph.min.js" | |
| integrity="sha256-incz+t+g09rlM/2ASDxkCIUiHJNFjBcRyUB5dQj0ZmI=" | |
| crossorigin="anonymous" | |
| ></script> | |
| <script> | |
| const morphTo = async (url, opts = {}) => { | |
| const res = await fetch(url, { headers: { 'X-Requested-With': 'Idiomorph' }, ...opts }); | |
| const text = await res.text(); | |
| const html = new DOMParser().parseFromString(text, 'text/html'); |
| <?php | |
| namespace App\Models\Concepts; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Support\Str; | |
| /** @mixin Model */ | |
| trait HasUUID | |
| { |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Ableton MajorVersion="5" MinorVersion="12.0_12049" SchemaChangeCount="7" Creator="Ableton Live 12.0.5d1" Revision="4daa12474c52194070371c09a9a78dc600078aec"> | |
| <Theme> | |
| <ControlForeground Value="#18110a" /> | |
| <TextDisabled Value="#776b61" /> | |
| <ControlDisabled Value="#f3f0ef" /> | |
| <MeterBackground Value="#2b2219" /> | |
| <SurfaceHighlight Value="#c3bab4" /> | |
| <SurfaceArea Value="#776b61" /> | |
| <Desktop Value="#8b7f76" /> |
| <?php | |
| namespace Illuminate\Tests\View\Blade; | |
| class BladeUseTest extends AbstractBladeTestCase | |
| { | |
| public function testUseStatementsAreCompiled() | |
| { | |
| $expected = "Foo <?php use \SomeNamespace\SomeClass as Foo; ?> bar"; |
Use namespaces and PHP 8 callable syntax. Prefer functions over classes, composition over inheritance.
Example: namespace MyProject; add_filter('tiny_mce_plugins', remove_emoji_dns_prefetch(...));
This is a file within a theme, Inc. Complete the task now and use the latest features, if applicable. We don't use Gutenberg and rely on the classic editor/tinymce.
| <?php | |
| /** | |
| * Plugin Name: SVG Upload Support | |
| * Description: Allows SVG uploads for admins only. | |
| * Version: 1.0 | |
| * Author: Ostap Brehin | |
| * Author URI: https://ostapbrehin.com | |
| */ | |
| add_filter('upload_mimes', function ($mimes) { |