@role
Blade Directive For Laravel Spark
Assumes you're using teams
Add this to the boot()
method of your AppServiceProvider
\Blade::directive('role', function($roles) {
$user = auth()->user();
@role
Blade Directive For Laravel SparkAssumes you're using teams
Add this to the boot()
method of your AppServiceProvider
\Blade::directive('role', function($roles) {
$user = auth()->user();
function wp_api_encode_acf($data,$post,$context){ | |
$data['meta'] = array_merge($data['meta'],get_fields($post['ID'])); | |
return $data; | |
} | |
if( function_exists('get_fields') ){ | |
add_filter('json_prepare_post', 'wp_api_encode_acf', 10, 3); | |
} |
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It's a breeze. Simply tell Laravel the URIs it should respond to | |
| and give it the Closure to execute when that URI is requested. |
#!/bin/bash | |
for f in *.scss; do sass-convert $f ${f%scss}sass ; done | |
rm *.scss |
/* Android stock browser won't let you set font-size smaller than 8px unless you apply this. */ | |
:root { | |
-webkit-text-size-adjust: none; | |
-moz-text-size-adjust: none; | |
-ms-text-size-adjust: none; | |
-o-text-size-adjust: none; | |
text-size-adjust: none; | |
} |
guard 'process', :name => 'shrink-images', :command => 'ruby resize-mobile-images.rb mobileretina' do | |
watch /^images\/mobileretina\/.+/ | |
end |
#!/usr/bin/env ruby | |
errors = false | |
# Create a simple line break | |
puts "" | |
# Now let's get a list of the changed files that have been staged | |
changed_files = `git diff --staged --name-only HEAD`.split("\n") |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title><?php echo $page_title; ?></title> | |
</head> | |
<body> | |
<?php echo $content_for_layout; ?> |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
/* | |
* Swipe 1.0 | |
* | |
* Brad Birdsall, Prime | |
* Copyright 2011, Licensed GPL & MIT | |
* | |
*/ | |
window.Swipe = function(element, options) { |