Team Role Middleware For Laravel Spark
Makes it simple to use Spark's role feature on routes
Route::group(['middleware'=>'role:owner'], function(){
// owners only
});
Route::group(['middleware'=>'role:member'], function(){Makes it simple to use Spark's role feature on routes
Route::group(['middleware'=>'role:owner'], function(){
// owners only
});
Route::group(['middleware'=>'role:member'], function(){None of this is production code, but me trying to figure out how to work multiple datasets into a Laravel project with chartjs. Here's my table schema
Schema::create('statistics', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->string('type');
$table->string('table');
$table->integer('count');
$table->timestamps();
});| [ | |
| "United States" => "us", | |
| "Afghanistan" => "af", | |
| "Albania" => "al", | |
| "Algeria" => "dz", | |
| "American Samoa" => "as", | |
| "Andorra" => "ad", | |
| "Angola" => "ad", | |
| "Anguilla" => "ai", | |
| "Antarctica" => "aq", |
| <?php | |
| function bbg_csv_export() { | |
| if ( ! is_super_admin() ) { | |
| return; | |
| } | |
| if ( ! isset( $_GET['bbg_export'] ) ) { | |
| return; | |
| } |
| function add_custom_content_to_analysis( $content ) { | |
| global $post; | |
| $custom = get_post_custom( $post->ID ); | |
| $custom_content = ''; | |
| foreach( $custom as $field ) | |
| { | |
| $custom_content .= $field[0].' '; | |
| } | |
| return $content . ' ' . $custom_content; | |
| } |
| <?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{ |