Blade is a simple, yet powerful templating engine provided with [Laravel] (http://laravel.com) PHP framework.
These snippets works with blade files (.blade.php) either with php syntax or with blade syntax using: PHP - Laravel Blade available from [Laravel Blade Highlighter] (https://github.com/Medalink/laravel-blade) package.
##Usage
When you're on a blade file, type the snippet shortcut then press tab key.
##Installation
Via Package Manager search for Blade Snippets then click/tap…wait a sec and tadam!
Or clone this repository into your Packages folder:
git clone https://github.com/dev4dev/blade-snippets.git
Or download the snippets zip file and unzip it into your Packages folder.
##Avalable snippets
| Shortcut | Result |
|---|---|
| lay | @layout('`name`') |
| sec |
@section('`name`')
@endsection |
| secy |
@section('`name`')
@yield_section |
| yl | @yield('`name`') |
| par | @parent |
| }} | {{ $`var` }} |
| }}} | {{ `expression` }} |
| inc | @include('`name`') |
| if |
@if (`condition`)
@endif |
| ife |
@if (`condition`)
@else @endif |
| foreach |
@foreach(`$array` as `$element`)
@endforeach |
| fore |
@forelse (`$array` as `$element`)
@endforelse |
| for |
@for (`$i` = `0`; `$i` `<` `…`; `$i++`)
@endfor |
| while |
@while (`condition`)
@endwhile |
| unless |
@unless (`condition`)
@endunless |
Original snippets by:
@dev4dev
Cool Readme formatting and latest updates belong to:
- Github: @AAlakkad.
- Twitter: @Am_Alakkad.
- Email: [am.alakkad@gmail.com] (mailto:am.alakkad@gmail.com).
