Skip to content

Instantly share code, notes, and snippets.

@temisrei
Created July 12, 2017 09:21
Show Gist options
  • Save temisrei/f2b0d744206d202e0c7c049624a80c2a to your computer and use it in GitHub Desktop.
Save temisrei/f2b0d744206d202e0c7c049624a80c2a to your computer and use it in GitHub Desktop.
{
// Place your snippets for Laravel Blade here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"LaravelCollective Form::submit": {
"prefix": "lcBtnSubmit",
"body": [
"{!! Form::submit('${1:存檔}', ['class'=>'${2:btn btn-primary}']) !!}"
],
"description": "Generating A Submit Button"
},
"LaravelCollective Form::open": {
"prefix": "lcFormOpen",
"body": [
"{!! Form::open(['method'=>'${1:post}', 'action'=>'${2:PostsController@store}']) !!}"
],
"description": "Opening A Form"
},
"LaravelCollective Form::text": {
"prefix": "lcInputText",
"body": [
"<div class=\"form-group\">",
" {!! Form::label('title', '文章標題') !!}",
" {!! Form::text('title', null, ['class'=>'form-control', 'placeholder'=>'請輸入標題']) !!}",
"</div>"
],
"description": "Generating A Text Input"
},
"LaravelCollective Form::textarea": {
"prefix": "lcInputTextarea",
"body": [
"<div class=\"form-group\">",
" {!! Form::label('fulltext', '文章內容') !!}",
" {!! Form::textarea('fulltext', null, ['class'=>'form-control', 'placeholder'=>'請輸入內容'])!!}",
"</div>"
],
"description": "Generating A TextArea Input"
},
"LaravelCollective Form::close": {
"prefix": "lcFormClose",
"body": [
"{!! Form::close() !!}"
],
"description": "Closing A Form"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment