This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
//set the index counter | |
var i = 0; | |
//convert all .nav-tabs, except those with the class .keep-tabs | |
$('.nav-tabs').not( ".keep-tabs" ).each(function(){ | |
//init variables | |
var $select, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Http/Controllers/PageController.php | |
public function index() { | |
$users = Page::sort()->paginate(10)->appends(request()->query()); | |
return view('pages', compact('pages')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Pug Bomb API Endpoint | |
Description: Adds an API endpoint at /api/pugs/$n_pugs | |
Version: 0.1 | |
Author: Brian Fegter | |
Author URL: http://coderrr.com | |
*/ | |
class Pugs_API_Endpoint{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
beforeRouteEnter(route, redirect, next) { | |
next(vm => { | |
vm.$http.get(`${API.BASE}/${API.PAGE}/${route.name}`).then((response) => { | |
vm.page = response.data.page; | |
vm.eventHub.$emit('update-breadcrumb', [ | |
{ | |
title: 'Home', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Spatie\Permission; | |
use Blade; | |
use Illuminate\Support\ServiceProvider; | |
use Spatie\Permission\Contracts\Permission as PermissionContract; | |
use Spatie\Permission\Contracts\Role as RoleContract; | |
class PermissionServiceProvider extends ServiceProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############################################################ | |
# Usage # | |
# https://gist.github.com/hfossli/4368aa5a577742c3c9f9266ed214aa58 | |
############################################################ | |
function usage() { | |
if [ -n "$1" ]; then | |
echo -e "${RED}👉 $1${CLEAR}\n"; | |
fi |
OlderNewer