Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

laravel-blade

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-blade

Laravel blade snippets and syntax highlight support

  • 1.24.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

Laravel Blade Snippets

Laravel blade snippets and syntax highlight support for Visual Studio Code.

Suggest Laravel related extension: Laravel Snippets

Screenshot

Demo

User Settings

Open Preferences -> Settings

"emmet.triggerExpansionOnTab": true, // enable tab to expanse emmet tags
"blade.format.enable": true,         // if you would like to enable blade format

Specific settings for blade language

"[blade]": {
    "editor.autoClosingBrackets": "always"
},

Features

  • Blade syntax highlight
  • Blade snippets
  • Emmet works in blade template
  • Blade formatting

Blade Syntax Hightlight

  • Auto detected with .blade.php extension
  • Manually switch language mode to Blade (Ctrl + K, M or ⌘ + K, M)

Laravel Blade Snippets

TriggerSnippet
b:extends@extends
b:yield@yield
b:section@section...@endsection
b:section-show@section...@show
b:if@if...@endif
b:if-else@if...@else...@endif
b:unless@unless...@endunless
b:has-section@hasSection...@else...@endif
b:for@for...@endfor
b:foreach@foreach...@endforeach
b:forelse@forelse...@empty...@endforelse
b:while@while...@endwhile
b:each@each
b:push@push...@endpush
b:stack@stack
b:inject@inject
b:comment{{-- comment --}} (Ctrl + / or ⌘ + /)
b:echo{{ $data }}
b:echo-html{!! $html !!}
b:echo-raw@{{ variable }}
b:can@can...@endcan (v5.1)
b:can-elsecan@can...@elsecan...@endcan (v5.1)
b:cannot@cannot...@endcannot (v5.3)
b:cannot-elsecannot@cannot...@elsecannot...@endcannot (v5.3)
b:verbatim@verbatim...@endverbatim (v5.3)
b:php@php...@endphp (v5.3)
b:includeIf@includeIf (v5.3)
b:includeWhen@includeWhen (v5.4)
b:includeFirst@includeFirst (v5.5)
b:includeUnless@includeUnless (v6.x)
b:component@component...@endcomponent (v5.4)
b:slot@slot...@endslot (v5.4)
b:isset@isset...@endisset (v5.4)
b:empty@empty...@endempty (v5.4)
b:auth@auth...@endauth (v5.5)
b:guest@guest...@endguest (v5.5)
b:switch@switch...@case...@endswitch (v5.5)
b:lang@lang
b:csrf@csrf (v5.6)
b:method@method(...) (v5.6)
b:dump@dump(...) (v5.6)
b:error@error...@enderror (v5.8)
b:props@props (v7.4)
b:production@production...@endproduction
b:env@env...@endenv

$loop variable (Laravel v5.3+)

TriggerSnippet
b:loop$loop->(index,remaining,count,first,last,depth,parent)
b:loop-first@if($loop->first)...@endif
b:loop-last@if($loop->last)...@endif

Laravel Helper Snippets for Blade

TriggerLaravel Helper
lv:elixirelixir() - deprecated
lv:mixmix() (v5.4)
lv:transtrans()
lv:actionaction()
lv:secure-assetsecure_asset()
lv:urlurl()
lv:assetasset()
lv:routeroute()
lv:csrf-fieldcsrf_field()
lv:csrf-tokencsrf_token()
lv:pagination-links$collection->links()

Blade extensions (register in the boot method of ServiceProvider)

  • Blade::component
  • Blade::include
  • Blade::if
  • Blade::directive

Contact

Please file any issues or have a suggestion please tweet me @onecentlin.

Credits

License

Please read License for more information

Keywords

FAQs

Package last updated on 13 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc