helper.php
function set_active($path, $active = 'active') {
return call_user_func_array('Request::is', (array)$path) ? $active : '';
}
master.blade.php
Example of jQuery inputmask.
<input id="test" type="text"></input>
<button id="btn">click</button>
#test {
text-transform:uppercase;
<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
URL
<The URL Structure (path only, no root url)>
Method:
<div class="row">
{!! Form::open(['route' => 'some.route', 'autocomplete' => 'off', 'class' => 'col s12']) !!}
<div class="row">
<div class="input-field col s6">
{!! Form::text('username', isset($user->username) ? $user->username : '', ['id' => 'username', 'placeholder' => '']) !!}
{!! Form::label('username', 'Username') !!}
</div>
</div>
This method will strip off curly brackets from the given table name
and replace the percentage character '%' with [[tablePrefix]].
let re = /{{(.*?)}}/g
let str = 'SELECT * FROM {{%user}} FROM WHERE id IN (?)'
let tablePrefix = 'tbl_'
console.log(str.replace(re, '$1').replace('%', tablePrefix))
Demo of multipart form/file uploading with hapi.js
.
npm install
npm run setup
npm run server
Then ...
{% if messages %} | |
{% for message in messages %} | |
<div class="alert {% if message.tags %} alert-{{ message.tags }}{% endif %}">{{ message|safe }}</div> | |
{% endfor %} | |
{% endif %} | |
{% if form.errors %} | |
<div class="alert alert-error"> | |
<h4>Please fix the following errors</h4> | |
<ul> |
// From http://stackoverflow.com/a/26761864/2126472 | |
$('#txtSample').focus().val($('#txtSample').val()); |
<script\x20type="text/javascript">javascript:alert(1);</script> | |
<script\x3Etype="text/javascript">javascript:alert(1);</script> | |
<script\x0Dtype="text/javascript">javascript:alert(1);</script> | |
<script\x09type="text/javascript">javascript:alert(1);</script> | |
<script\x0Ctype="text/javascript">javascript:alert(1);</script> | |
<script\x2Ftype="text/javascript">javascript:alert(1);</script> | |
<script\x0Atype="text/javascript">javascript:alert(1);</script> | |
'`"><\x3Cscript>javascript:alert(1)</script> | |
'`"><\x00script>javascript:alert(1)</script> | |
<img src=1 href=1 onerror="javascript:alert(1)"></img> |