From 8750ec99bf55c0804e14477e9e77e4d0c60aa816 Mon Sep 17 00:00:00 2001 From: Kennith Leung Date: Wed, 15 May 2019 08:52:36 -0700 Subject: [PATCH] Add @error directive @error and @enderror was added in Laravel 5.8.13 See https://github.com/laravel/framework/pull/28062 --- blade.sublime-syntax | 6 +++--- test.blade.php | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/blade.sublime-syntax b/blade.sublime-syntax index 18426d5..4b2fd91 100644 --- a/blade.sublime-syntax +++ b/blade.sublime-syntax @@ -90,7 +90,7 @@ contexts: pop: true - include: 'scope:source.php' - - match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\(\()' + - match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|error|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\(\()' captures: 0: punctuation.section.embedded.php 2: constant.other.inline-data.html @@ -102,7 +102,7 @@ contexts: pop: true - include: 'scope:source.php' - - match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\()' + - match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|error|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\()' captures: 0: punctuation.section.embedded.php 2: constant.other.inline-data.html @@ -114,7 +114,7 @@ contexts: pop: true - include: 'scope:source.php' - - match: '(\s{0}|^)(\@)\b(acfend|after|append|auth|break|breakpoint|continue|csrf|default|else|empty|endswitch|endafter|endauth|endblock|endcan|endcannot|endcomponent|endembed|endempty|endfor|endforeach|endforelse|endguest|endif|endisset|endmacro|endmarkdown|endminify|endpartial|endpush|endsection|endsetup|endslot|endstory|endtask|endunless|endwhile|guest|markdown|overwrite|parent|setup|show|stop|verbatim|endverbatim|wpempty|wpend|wpquery)\b' + - match: '(\s{0}|^)(\@)\b(acfend|after|append|auth|break|breakpoint|continue|csrf|default|else|empty|endswitch|endafter|endauth|endblock|endcan|endcannot|endcomponent|endembed|endempty|enderror|endfor|endforeach|endforelse|endguest|endif|endisset|endmacro|endmarkdown|endminify|endpartial|endpush|endsection|endsetup|endslot|endstory|endtask|endunless|endwhile|guest|markdown|overwrite|parent|setup|show|stop|verbatim|endverbatim|wpempty|wpend|wpquery)\b' scope: custom.compiler.blade.php captures: 0: punctuation.section.embedded.php diff --git a/test.blade.php b/test.blade.php index 287ff01..1e38b57 100644 --- a/test.blade.php +++ b/test.blade.php @@ -410,4 +410,8 @@ @csrf @dd('Compile the "dd" statements into valid PHP.') @dump('Compile the "dump" statements into valid PHP') -@method('post') \ No newline at end of file +@method('post') + +{{-- Validation Errors --}} +@error('title') +@enderror \ No newline at end of file