Skip to content

Instantly share code, notes, and snippets.

@gravitano
Last active June 17, 2018 04:10
Show Gist options
  • Save gravitano/55e77aeb95b5be23c293 to your computer and use it in GitHub Desktop.
Save gravitano/55e77aeb95b5be23c293 to your computer and use it in GitHub Desktop.
Blade snippets for vim snipMate
snippet yl
@yield('${1:content}')
snippet yld
@yield('${1:content}', '${2:default}')
snippet ext
@extends('${1:layouts.master'})
@section('${2:content}')
${3://}
@stop
snippet sec
@section('${1:content}')
${2://}
@stop
snippet foreach
@foreach(${1:$data} as ${2:$value})
${3://}
@endforeach
snippet if
@if(${1})
${2}
@endif
snippet while
@while(${1})
${2}
@endwhile
snippet unless
@unless(${1})
${2}
@endunless
snippet for
@for(${1})
${2}
@endfor
snippet echo
<?php echo ${1:$data}; ?>
snippet var
<?php $${1:var} = ${2:""}; ?>${3}
snippet {{
{{ ${1} }}${2}
snippet {{{
{{{ ${1} }}}${2}
snippet textfield
<div class="form-group">
{{ Form::label('${1:name}', '${2:title}:') }}
{{ Form::${3:text}('$1', ${4:null, }['class' => 'form-control']) }}
</div>
${5}
snippet btnfield
<div class="form-group">
{{ Form::${1:submit}('${2:Submit}', ['class' => 'btn btn-primary']) }}
</div>
${3}
@aggunawan
Copy link

I think you should remove textfield and btnfield, becuse Laravel not comes with laravelcollective/html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment