Compare commits

..

No commits in common. "master" and "220e16aa364535f7a4790a13726e1224a7127d41" have entirely different histories.

16 changed files with 164 additions and 460 deletions

View File

@ -5,7 +5,6 @@
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"control_character_style": "names",
"copy_with_empty_selection": false,
"default_line_ending": "unix",
"fallback_encoding": "UTF-8",
"folder_exclude_patterns":
[
@ -25,15 +24,13 @@
[
"dlig"
],
"git_diff_target": "head",
"hardware_acceleration": "opengl",
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage",
],
"index_workers": 4,
"line_padding_bottom": 3,
"line_padding_bottom": 2,
"line_padding_top": 2,
"material_theme_accent_cyan": true,
"material_theme_bold_tab": true,
@ -43,6 +40,7 @@
"show_line_endings": true,
"theme": "Material-Theme.sublime-theme",
"translate_tabs_to_spaces": true,
/*"font_size": 9,*/
/*"font_size": 11,*/
/*"font_size": 9,*/
/*"font_size": 9,*/
}

View File

@ -1,77 +1,68 @@
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Set the base URL for all relative URLs within the document -->
<base href="{{ url('/') }}">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="robots" content="index,follow">
<meta name="googlebot" content="index,follow">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="x-dns-prefetch-control" content="off">
<meta name="google" content="notranslate">
<meta name="google" content="nositelinkssearchbox">
<meta name="rating" content="General">
<meta name="url" content="{{ url('/') }}">
<meta name="subject" content="{{ \$pageSubject ?? "your website's subject" }}"">
<meta name="description" content="{{ \$pageDescription ?? 'A description of the page' }}">
<meta name="subject" content="your website's subject">
<meta name="description" content="A description of the page">
<title>{{ config('app.name', 'Laravel') }}</title>
<meta name="application-name" content="{{ config('app.name', 'Laravel') }}">
<!-- Privacy -->
<meta name="twitter:dnt" content="on">
<meta name="pinterest" content="nopin" description="No pinning allowed.">
<!-- analytics -->
<!-- -->
<!-- Helps prevent duplicate content issues -->
{{-- <link href="{{ route()->current() }}" rel="canonical"> --}}
<link href="{{ route()->current() }}" rel="canonical">
<!-- Gives a reference to a location in your document that may be in another language -->
{{-- <link href="#" rel="alternate" hreflang="de"> --}}
<link href="{{ url('copyright.html') }}" rel="copyright" integrity="{{ env('INTEGRITY_HASH_COPYRIGHT_HTML') }}">
<link href="#" rel="alternate" hreflang="de">
<!-- Favicon -->
<link href="{{ url('/favicon.ico') }}" rel="icon" sizes="16x16" type="image/icon" integrity="{{ env('INTEGRITY_HASH_FAVICON_ICO') }}">
<link href="{{ url('/favicon.svg') }}" rel="icon" type="image/svg+xml" integrity="{{ env('INTEGRITY_HASH_FAVICON_SVG') }}">
<link href="{{ url('/favicon.png') }}" rel="icon" sizes="192x192" integrity="{{ env('INTEGRITY_HASH_FAVICON_PNG') }}">
<link href="/favicon.ico" rel="icon" sizes="16x16" type="image/icon">
<link href="/favicon.svg" rel="icon" type="image/svg+xml">
<link href="/favicon.png" rel="icon" sizes="192x192">
<!-- Font preloads (should be done for each font file) -->
<link href="{{ url('fonts/fontfam/font.woff2') }}" rel="preload" as="font" type="font/woff2" crossorigin="anonymous">
<link href="{{ asset('fonts/fontfam/font.woff2') }}" rel="preload" as="font" type="font/woff2" crossorigin="anonymous">
<link href="{{ asset('fonts/fontfam/font.woff') }}" rel="preload" as="font" type="font/woff" crossorigin="anonymous">
<!-- Styles -->
<link href="{{ mix('/css/app.css') }}" rel="stylesheet" media="all" integrity="{{ env('INTEGRITY_HASH_APP_CSS') }}">
<link href="{{ asset('css/app.css') }}" rel="stylesheet" media="screen">
<link href="{{ asset('css/print.css') }}" rel="stylesheet" media="print">
@yield('css')
<!-- Scripts -->
<script>
if (localStorage.theme === "dark" || (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
document.documentElement.classList.add("dark"); localStorage.theme = "dark";
} else {
document.documentElement.classList.remove("dark"); localStorage.theme = "light";
}
<!-- JS that must be executed before the document is loaded -->
<script type="module">
document.documentElement.classList.remove('no-js');
document.documentElement.classList.add('js');
</script>
@routes
<script src="{{ mix('/js/app.js') }}" integrity="{{ env('INTEGRITY_HASH_APP_JS') }}" defer></script>
@inertiaHead
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
@yield('js')
</head>
<body class="font-sans antialiased">
<div id="app" class="min-h-screen bg-gray-100">
@yield('body')
@inertia
</div>
</body>
</html>

View File

@ -1,36 +0,0 @@
<snippet>
<content><![CDATA[
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
-
### Changed
-
### Removed
-
## [1.0.0] - 20XX-01-01
### Added
-
### Changed
-
### Removed
-
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>changelog</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>

View File

@ -2,9 +2,10 @@
<content><![CDATA[
@font-face {
font-family: "${1:FontFamily}";
src: url(fonts/${1:FontFamily}/${2:FontName}.woff2) format("woff2");
font-weight: 400; /* thin/100, extralight/200, light/300, normal/400, medium/500, semibold/600, bold/700, extrabold/800, black/900 */
font-style: normal; /* normal, italic, oblique, oblique 10deg */
src: url(fonts/${1:FontFamily}/${2:FontName}.woff2) format("woff2"),
url(fonts/${1:FontFamily}/${2:FontName}.woff) format("woff");
font-weight: 400; /* normal/400, bold/700 */
font-style: normal; /* normal, italic, oblique */
font-display: swap; /* swap, fallback */
}

View File

@ -1,9 +1,8 @@
<snippet>
<content><![CDATA[
<div class="grid auto-rows-max gap-y-1">
<label for="${1:foo}" class="">${2:Foo}</label>
<input type="${3:text}" id="${1:foo}" name="${1:foo}" value="" class="" placeholder="${4:placeholder text}">
<p>Input error</p>
<div class="">
<label for="${1:foo}">${2:Foo}</label>
<input type="${3:text}" id="${1:foo}" name="${1:foo}" value="" placeholder="${4:placeholder text}">
</div>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->

View File

@ -8,26 +8,24 @@
docker-compose.override.yml
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/storage/*.key
# Directories
/node_modules
/public/build
/public/hot
/public/storage
/vendor
### Editor Specific
# Files
/*.sublime-project
/*.sublime-workspace
${1:*}.sublime-project
${1:*}.sublime-workspace
# Directories
/.idea
/.vscode
.idea
.vscode
### System Specific
# Files

View File

@ -6,9 +6,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Set the base URL for all relative URLs within the document -->
<base href="https://example.com/">
<meta name="robots" content="index,follow">
<meta name="googlebot" content="index,follow">
@ -28,7 +25,6 @@
<!-- Privacy -->
<meta name="twitter:dnt" content="on">
<meta name="pinterest" content="nopin" description="No pinning allowed.">
<!-- analytics -->
<!-- -->
@ -43,44 +39,40 @@
<link href="https://example.com/2003/05/" title="May 2003" rel="archives">
<!-- Android web manifest file -->
<link href="https://example.com/.webmanifest" rel="manifest">
<link href="/.webmanifest" rel="manifest">
<!-- Files listing who was involved in this site and copyrights -->
<link href="https://example.com/humans.txt" rel="author">
<link href="https://example.com/copyright.html" rel="copyright">
<!-- Feeds -->
<link href="https://example.com/rss.xml" type="application/rss+xml" title="RSS" rel="alternate">
<link href="https://feeds.feedburner.com/example" type="application/rss+xml" title="RSS" rel="alternate">
<link href="https://example.com/feed.atom" type="application/atom+xml" title="Atom 0.3" rel="alternate">
<!-- Favicon -->
<link href="https://example.com/favicon.ico" rel="icon" sizes="16x16" type="image/icon">
<link href="https://example.com/favicon.svg" rel="icon" type="image/svg+xml">
<link href="https://example.com/favicon.png" rel="icon" sizes="192x192">
<link href="/favicon.ico" rel="icon" sizes="16x16" type="image/icon">
<link href="/favicon.svg" rel="icon" type="image/svg+xml">
<link href="/favicon.png" rel="icon" sizes="192x192">
<!-- Font preloads (should be done for each font file) -->
<link href="https://example.com/fonts/fontfam/font.woff2" rel="preload" as="font" type="font/woff2" crossorigin="anonymous">
<link href="https://example.com/fonts/fontfam/font.woff" rel="preload" as="font" type="font/woff" crossorigin="anonymous">
<!-- CSS -->
<link href="https://example.com/css/app.css" rel="stylesheet" media="screen">
<link href="https://example.com/css/print.css" rel="stylesheet" media="print">
<!-- JS that must be executed before the document is loaded -->
<script>
if (localStorage.theme === "dark" || (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
document.documentElement.classList.add("dark"); localStorage.theme = "dark";
} else {
document.documentElement.classList.remove("dark"); localStorage.theme = "light";
}
</script>
<!-- -->
<script src="https://example.com/js/vendor/axios.min.js" defer></script>
<script src="https://example.com/js/vendor/vue.min.js" defer></script>
<script src="https://example.com/js/app.js" defer></script>
<!-- -->
</head>
<body class="font-sans antialiased">
<div id="app" class="min-h-screen bg-neutral-100">
<!-- content here -->
<body>
<div id="app">
<!-- -->
</div>
</body>
</html>

View File

@ -1,20 +0,0 @@
<snippet>
<content><![CDATA[
<img alt="alt text"
loading="lazy"
decoding="async"
height="1080"
width="1920"
srcset="${1:some_image}_sd_640.jpg?w=50&fm=jpg&fl=progressive 640w,
${1:some_image}_hd_720.jpg?w=100&fm=jpg&fl=progressive 720w,
${1:some_image}_hd_1920.jpg?w=200&fm=jpg&fl=progressive 1920w"
sizes="(max-width: 640px) 640px,
(max-width: 720px) 720px,
1920px"
src="${1:some_image}_hd_1920.jpg">
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>img</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>

View File

@ -1,79 +1,70 @@
<snippet>
<content><![CDATA[
use App\Models\\${1:Model};
use Inertia\Inertia;
public function index(Request \$request)
public function index()
{
\$data = [
'all${2:Models}' => ${1:Model}::where('user_id', \$request->user()->id)->paginate(),
'${2:models}' => ${1:MODEL}::where('user_id', auth()->id())->paginate(),
];
return Inertia::render('Dashboard/${2:Models}/Index')->with(\$data);
return view('${2:models}.index')->with(\$data);
}
public function show(${1:Model} \$${4:model})
public function show(${1:MODEL} \$${3:model})
{
\$data = [
'${4:model}' => \$${4:model},
'${3:model}' => \$${3:model},
];
return Inertia::render('Dashboard/${2:Models}/Show')->with(\$data);
return view('${2:models}.show')->with(\$data);
}
public function create()
{
\$data = [];
return Inertia::render('Dashboard/${2:Models}/Create')->with(\$data);
return view('${2:models}.create')->with(\$data);
}
public function store(Request \$request)
{
\$${4:model} = new ${1:Model}();
\$${3:model} = new ${1:MODEL}();
// assign model fields
if (\$${4:model}->save()) {
\$request->session()->flash('flash', ['bannerStyle' => 'success', 'banner' => "Successfully added {\$${4:model}->${5:field}}."]);
return redirect()->route('dashboard.${3:models}.index')->with('status', "Successfully added {\$${4:model}->${5:field}}.");
if (\$${3:model}->save()) {
return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully added {\$${3:model}->${4:field}} as a ${3:model}.");
}
\$request->session()->flash('flash', ['bannerStyle' => 'danger', 'banner' => "Unable to save that ${4:model}."]);
return redirect()->back()->with('error', 'Unable to save that ${4:model}.');
return redirect()->back()->with('error', 'Unable to save that ${3:model}. Check the error logs.');
}
public function edit(Request \$request, ${1:Model} \$${4:model})
public function edit(${1:MODEL} \$${3:model})
{
\$data = [
'${4:model}' => \$${4:model},
'${3:model}' => \$${3:model},
];
return Inertia::render('Dashboard/${2:Models}/Edit')->with(\$data);
return view('${2:models}.edit')->with(\$data);
}
public function update(Request \$request, ${1:Model} \$${4:model})
public function update(Request \$request, ${1:MODEL} \$${3:model})
{
// assign model fields
if (\$${4:model}->update()) {
\$request->session()->flash('flash', ['bannerStyle' => 'success', 'banner' => "Successfully updated {\$${4:model}->${5:field}}."]);
return redirect()->route('dashboard.${3:models}.index')->with('status', "Successfully updated {\$${4:model}->${5:field}}.");
if (\$${3:model}->update()) {
return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully updated {\$${3:model}->${4:field}}.");
}
\$request->session()->flash('flash', ['bannerStyle' => 'danger', 'banner' => "Unable to update {\$${4:model}->${5:field}}."]);
return redirect()->back()->with('error', "Unable to update {\$${4:model}->${5:field}}.");
return redirect()->back()->with('error', "Unable to update {\$${3:model}->${4:field}}. Check the error logs.");
}
public function destroy(Request \$request, ${1:Model} \$${4:model})
public function destroy(${1:MODEL} \$${3:model})
{
\$${5:field} = \$${4:model}->${5:field};
if (\$${4:model}->delete()) {
\$request->session()->flash('flash', ['bannerStyle' => 'success', 'banner' => "Successfully removed {\$${5:field}}."]);
return redirect()->route('dashboard.${3:models}.index')->with('status', "Successfully removed {\$${5:field}}.");
\$${4:field} = \$${3:model}->${4:field};
if (\$${3:model}->delete()) {
return redirect()->route('dashboard.${2:models}.index')->with('status', "Successfully removed {\$${4:field}}.");
}
\$request->session()->flash('flash', ['bannerStyle' => 'danger', 'banner' => "Unable to remove {\$${5:field}}."]);
return redirect()->back()->with('error', "Unable to remove {\$${5:field}}.");
return redirect()->back()->with('error', "Unable to remove {\$${4:field}}. Check the error logs.");
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->

View File

@ -1,53 +0,0 @@
<snippet>
<content><![CDATA[
<?php
namespace App\Models\Traits;
trait HasUidTrait
{
/**
* Ensure that when a model is saving, a unique ID
* is set for the model.
*
* @since 1.0.0
*
* @return void
*/
public static function bootHasUidTrait(): void
{
//
}
/**
* Initialize logic.
*
* @since 1.0.0
*
* @return void
*/
protected function initializeHasUidTrait(): void
{
\$this->id = \$this->generateUid();
}
/**
* Generates a cryptographically safe unique ID.
*
* @since 1.0.0
*
* @return string
*/
public function generateUid(): string
{
\$bytes = openssl_random_pseudo_bytes(env('APP_UID_BYTES', 8));
return bin2hex(\$bytes);
}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>hasuid</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>

View File

@ -1,69 +1,29 @@
<snippet>
<content><![CDATA[
use App\Events\${1:Model}Created;
use App\Events\${1:Model}Creating;
use App\Events\${1:Model}Deleted;
use App\Events\${1:Model}Deleting;
use App\Events\${1:Model}Deleting;
use App\Events\${1:Model}Replicating;
use App\Events\${1:Model}Restored;
use App\Events\${1:Model}Restoring;
use App\Events\${1:Model}Retrieved;
use App\Events\${1:Model}Saved;
use App\Events\${1:Model}Saving;
use App\Events\${1:Model}Updated;
use App\Events\${1:Model}Updating;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Prunable;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Laravel\Scout\Searchable;
use Prunable; // \Illuminate\Database\Eloquent\Prunable
use HasUidTrait; // \App\Models\Traits\HasUidTrait
use Prunable;
use Searchable;
/** @var string */
protected \$table = '';
/** @var array<int,string> */
protected \$keyType = 'string';
public \$incrementing = false;
protected \$fillable = [];
/** @var array<int,string> */
protected \$hidden = [];
/** @var array<string,string> */
protected \$casts = [];
/** @var array<int,string> */
protected \$dates = [];
/** @var array<int,string> */
protected \$appends = [];
/** @var array<int,string> */
protected \$with = [];
/** @var array<int,string> */
protected \$touches = [];
/** @var array<int,string> */
protected \$dispatchesEvents = [
//'retrieved' => ${1:Model}Retrieved::class,
//'creating' => ${1:Model}Creating::class,
//'created' => ${1:Model}Created::class,
//'updating' => ${1:Model}Updating::class,
//'updated' => ${1:Model}Updated::class,
//'deleting' => ${1:Model}Deleting::class,
//'deleted' => ${1:Model}Deleted::class,
//'deleting' => ${1:Model}Deleting::class,
//'saving' => ${1:Model}Saving::class,
//'saved' => ${1:Model}Saved::class,
//'restoring' => ${1:Model}Restoring::class,
//'restored' => ${1:Model}Restored::class,
//'replicating' => ${1:Model}Replicating::class,
];
protected \$dispatchesEvents = [];
/**
/*
|--------------------------------------------------------------------------
| Class Constants
|--------------------------------------------------------------------------
@ -72,7 +32,7 @@ protected \$dispatchesEvents = [
//
/**
/*
|--------------------------------------------------------------------------
| Custom/Private Methods
|--------------------------------------------------------------------------
@ -82,22 +42,16 @@ protected \$dispatchesEvents = [
/**
* Get the prunable model query.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function prunable(): Builder
{
// return static::where('deleted_at', '<=', now()->subMonth());
return static::where('created_at', '<=', now()->subMonth());
}
/**
* Prepare the model for pruning.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return void
*/
protected function pruning(): void
@ -105,86 +59,16 @@ protected function pruning(): void
//
}
/**
* Get the value used to index the model.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return mixed
*/
public function getScoutKey()
{
return \$this->id;
}
/**
* Get the key name used to index the model.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return string
*/
public function getScoutKeyName(): string
{
return 'id';
}
/**
* Get the name of the index associated with the model.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return string
*/
public function searchableAs(): string
{
return 'prefix_models_index';
}
/**
* Get the indexable data array for the model.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return array
*/
public function toSearchableArray(): array
{
\$payload = \$this->toArray();
// modify here...
return \$payload;
}
/**
/*
|--------------------------------------------------------------------------
| Accessors
|--------------------------------------------------------------------------
|
*/
/**
* An accessor.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return \Illuminate\Database\Eloquent\Casts\Attribute
*/
protected function attrName(): Attribute
{
return Attribute::make(
get: fn (\$value, \$attributes) => \$attributes['foo'],
set: fn (\$value, \$attributes) => \$attributes['foo'],
);
}
//
/**
/*
|--------------------------------------------------------------------------
| Mutators
|--------------------------------------------------------------------------
@ -193,7 +77,7 @@ protected function attrName(): Attribute
//
/**
/*
|--------------------------------------------------------------------------
| Scopes
|--------------------------------------------------------------------------
@ -202,28 +86,14 @@ protected function attrName(): Attribute
//
/**
/*
|--------------------------------------------------------------------------
| Relationships
|--------------------------------------------------------------------------
|
*/
/**
* Something relationship.
*
* @package App\Models\${1:Model}
* @since 1.0.0
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function something(): BelongsTo
{
return \$this->belongsTo(
related: Something::class,
foreignKey: 'something_id',
);
}
//
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>laramodel</tabTrigger>

View File

@ -1,14 +1,20 @@
<snippet>
<content><![CDATA[
Route::controller(${3:controller}Controller::class)->group(function () {
Route::get('/${1:route}', 'index')->name('dashboard.${1:route}.index');
Route::get('/${1:route}/create', 'create')->name('dashboard.${1:route}.create');
Route::post('/${1:route}', 'store')->name('dashboard.${1:route}.store');
Route::get('/${1:route}/{${2:model}}', 'show')->where('${2:model}', '[0-9]+')->name('dashboard.${1:route}.show');
Route::get('/${1:route}/{${2:model}}/edit', 'edit')->where('${2:model}', '[0-9]+')->name('dashboard.${1:route}.edit');
Route::post('/${1:route}/{${2:model}}', 'update')->where('${2:model}', '[0-9]+')->name('dashboard.${1:route}.update');
Route::delete('/${1:route}/{${2:model}}', 'destroy')->where('${2:model}', '[0-9]+')->name('dashboard.${1:route}.destroy');
});
Route::get('/${1:route}', [${3:controller}Controller::class, 'index'])->name('dashboard.${1:route}.index');
Route::get('/${1:route}/create', [${3:controller}Controller::class, 'create'])->name('dashboard.${1:route}.create');
Route::post('/${1:route}', [${3:controller}Controller::class, 'store'])->name('dashboard.${1:route}.store');
Route::get('/${1:route}/{${2:model}}', [${3:controller}Controller::class, 'show'])
->where('${2:model}', '[0-9]+')
->name('dashboard.${1:route}.show');
Route::get('/${1:route}/{${2:model}}/edit', [${3:controller}Controller::class, 'edit'])
->where('${2:model}', '[0-9]+')
->name('dashboard.${1:route}.edit');
Route::post('/${1:route}/{${2:model}}', [${3:controller}Controller::class, 'update'])
->where('${2:model}', '[0-9]+')
->name('dashboard.${1:route}.update');
Route::delete('/${1:route}/{${2:model}}', [${3:controller}Controller::class, 'destroy'])
->where('${2:model}', '[0-9]+')
->name('dashboard.${1:route}.destroy');
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>lararoutes</tabTrigger>

View File

@ -1,16 +1,15 @@
<snippet>
<content><![CDATA[
/**
* ${1:Description}.
* ${1:Description}
*
* @package Namespace\App\Class
* @since 1.0.0
* @since ${5:1.0.0}
*
* @param ${2:datatype} ${3:\$variable}
*
* @throws ${4:\Exception}
*
* @return ${5:void}
* @return ${6:void}
*/
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->

View File

@ -1,42 +1,47 @@
<snippet>
<content><![CDATA[
<picture>
<!-- https://github.com/nucliweb/image-element -->
<source
sizes="550px, (max-width: 768px) calc(100vw - 3em), (max-width: 1376px) calc(50vw - 8em)"
srcset="${1:imageName}-640w.jpg 640w, ${1:imageName}-1280w.jpg 1280w, ${1:imageName}-1920w.jpg 1920w"
type="image/jxl">
<source type="image/avif"
srcset="
${1:imageName}-640w.avif 640w,
${1:imageName}-1280w.avif 1280w,
${1:imageName}-1920w.avif 1920w
"
sizes="
550px,
(max-width: 768px) calc(100vw - 3em),
(max-width: 1376px) calc(50vw - 8em)
">
<source
sizes="550px, (max-width: 768px) calc(100vw - 3em), (max-width: 1376px) calc(50vw - 8em)"
srcset="${1:imageName}-640w.avif 640w, ${1:imageName}-1280w.avif 1280w, ${1:imageName}-1920w.avif 1920w"
type="image/avif">
<source type="image/webp"
srcset="
${1:imageName}.webp?w=100&fm=webp 100w,
${1:imageName}.webp?w=200&fm=webp 200w,
{1:imageName}.webp
"
sizes="
550px,
(max-width: 768px) calc(100vw - 3em),
(max-width: 1376px) calc(50vw - 8em)
">
<source
sizes="550px, (max-width: 768px) calc(100vw - 3em), (max-width: 1376px) calc(50vw - 8em)"
srcset="${1:imageName}-640w.webp?w=100&fm=webp 100w, ${1:imageName}-1280w.webp?w=200&fm=webp 200w, ${1:imageName}.webp"
type="image/webp">
<source
sizes="550px, (max-width: 768px) calc(100vw - 3em), (max-width: 1376px) calc(50vw - 8em)"
srcset="${1:imageName}-640w.jpg 640w, ${1:imageName}-1280w.jpg 1280w, ${1:imageName}-1920w.jpg 1920w"
type="image/jpeg">
<img
sizes="550px, (max-width: 768px) calc(100vw - 3em), (max-width: 1376px) calc(50vw - 8em)"
srcset="${1:imageName}.jpg?w=100&fm=jpg&fl=progressive 100w, ${1:imageName}.jpg?w=200&fm=jpg&fl=progressive 200w, ${1:imageName}.jpg"
src="${1:imageName}.jpg"
alt="${1:imageName}"
<!--
loading="lazy"
decoding="async"
-->
<!--
fetchpriority="high"
decoding="sync"
-->
width="{{ \$width }}"
height="{{ \$height }}">
<img
srcset="
${1:imageName}.jpg?w=100&fm=jpg&fl=progressive 100w,
${1:imageName}.jpg?w=200&fm=jpg&fl=progressive 200w,
${1:imageName}.jpg
"
sizes="
550px,
(max-width: 768px) calc(100vw - 3em),
(max-width: 1376px) calc(50vw - 8em)
"
src="${1:imageName}.jpg"
alt="${1:imageName}"
loading="lazy"
decoding="async"
width="{{ $width }}"
height="{{ $height }}">
</picture>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->

View File

@ -1,9 +0,0 @@
<snippet>
<content><![CDATA[
preserveAspectRatio="xMidYMid meet"
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>preserveAspect</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>

View File

@ -1,55 +1,27 @@
<snippet>
<content><![CDATA[
<script setup>
import { useAttrs, useSlots, reactive, ref, computed, watch, onBeforeMount, onMounted, onBeforeUpdate, onBeforeUnmount, onUnmounted, provide, inject } from 'vue'
import { Head, Link, useForm, usePage } from '@inertiajs/inertia-vue3'
import AppLayout from '@/Layouts/AppLayout.vue'
// defines
defineEmits([])
// variables
const props = defineProps({})
// computed properties
// watchers
// lifecycle hooks
onBeforeMount(() => {
//
})
onMounted(() => {
//
})
onBeforeUpdate(() => {
//
})
onBeforeUnmount(() => {
//
})
onUnmounted(() => {
//
})
// methods
</script>
<template>
<AppLayout title="${1:TITLE}">
<template #header>${1:TITLE}</template>
<div class="col-span-12">
<!-- content goes here -->
</div>
</AppLayout>
<div class="v-root"></div>
</template>
<script>
import { defineComponent } from 'vue'
export default defineComponent({
props: {},
data() {
return {}
},
computed: {},
mounted() {},
methods: {},
})
</script>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>vcomp</tabTrigger>