Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laravel-china/phpstorm-livetemplates
Collections of PhpStorm-LiveTemplates
https://github.com/laravel-china/phpstorm-livetemplates
Last synced: about 2 months ago
JSON representation
Collections of PhpStorm-LiveTemplates
- Host: GitHub
- URL: https://github.com/laravel-china/phpstorm-livetemplates
- Owner: laravel-china
- License: mit
- Created: 2015-03-04T12:01:39.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-07T12:45:05.000Z (almost 10 years ago)
- Last Synced: 2024-06-22T13:03:47.710Z (7 months ago)
- Size: 141 KB
- Stars: 7
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PhpStorm-LiveTemplates
Collections of PhpStorm-LiveTemplates## Installation
First, find your configuration folder.
Windows: \.WebIde\config
Linux: ~\.WebIde\config
MacOS: ~/Library/Preferences/WebIdeOn my MacOS, it would be `~/Library/Preferences/WebIde80` so you have to adjust commands to your platform. There is a `templates/` directory. It contains XML files with Live Templates.
Create a git repository in the `templates/` dir and pull the templates
```bash
$ cd ~/Library/Preferences/WebIde80/templates
$ git init
$ git remote add origin [email protected]:laravel-china/PhpStorm-LiveTemplates.git
$ git pull origin master
```
If this wouldn't work, you should just backup your templates, clone the repo and merge them manually.##Forms
**fo** Form open tag
```php
{!! Form::open() !!}
```**fc** Form close tag
```php
{!! Form::close() !!}
```**textfield** Text form field
```php
{!! Form::label('$NAME$', '$VALUE$:') !!}
{!! Form::text('$NAME$', null, ['class' => 'form-control']) !!}
```**emailfield** Email form field
```php
{!! Form::label('$NAME$', '$VALUE$:') !!}
{!! Form::email('$NAME$', null, ['class' => 'form-control']) !!}
```**passwordfield** Password form field
```php
{!! Form::label('$NAME$', '$VALUE$:') !!}
{!! Form::password('$NAME$', ['class' => 'form-control']) !!}
```**textareafield** Text area form field
```php
{!! Form::label('$NAME$', '$VALUE$:') !!}
{!! Form::textarea('$NAME$', null, ['class' => 'form-control']) !!}
```**hiddenfield** Hidden form field
```php
{!! Form::hidden('$NAME$', $VALUE$) !!}
```**submitfield** Submit form field
```php
{!! Form::submit('$NAME$', ['class' => 'btn btn-primary']) !!}
```**req** Require field (add in the attribute array of any form field type to make field required.
```php
'required' => 'required'
```