blade-snippets

Laravel 5 blade snippets! useful snippets for the blade templating engine.

slayerfat

65,949

52

0.2.0

MIT

GitHub

#Blade templating snippets for Atom

Laravel 5 blade snippets! useful snippets for the Blade Templating Engine to use in Atom.

Converted from blade-snippets for sublime using the sublime to atom script.

##Usage

These snippets will trigger only in *.blade.php files.

Type any snippet and hit TAB to receive incredible results!.

echo + TAB = {{ $var }}

Checkout the Available blade snippets.

I recommend this Blade language Package for Atom to be able to take full advantage of the Blade Templating Engine in this amazing editor.

##Available snippets

Shortcut Result
}} or echo or print {{ $var }}
!! or uecho or uprint {!! $var !!}
sec or section @section('name')

@endsection
sshow or secs @section('name')

@show
inc or include @include('view.name', ['some' => 'data'])
ext or extends @extends('name')
yl or yield @yield('section')
par or parent @parent
if @if (condition)

@endif
ife @if (condition)

@else

@endif
for @for ($i = 0; $i < ; $i++)

@endfor
while @while (condition)

@endwhile
un or unless @unless (condition)

@endunless
fea or foreach @foreach($array as $element)

@endforeach
fel or forelse @forelse ($array as $element)

@endforelse
each @each ('item.view', $items, 'item', 'empty.view')
trans {!! trans('language.line') !!}
route {!! route('name') !!}
asset {!! asset('path') !!}
action {!! link_to_action('Controller@method') !!}
choice @choice('language.line', $number)
comment or // {{-- comment --}}

##Disclaimer

Feel free to contribute!

As of today, i am a complete noob at making atom packages, if there is any error, suggestion, improvement, etc, to point or make, feel free to do so.