FEATURE: add functionality for rendering widgets via shortcode [widget]

This commit is contained in:
Michal Kváček
2016-10-11 19:10:03 +02:00
parent d5f9e1fc2b
commit 625bdbb2e2
14 changed files with 217 additions and 43 deletions
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddNumberOfViewsToWidgets extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('widgets', function (Blueprint $table) {
$table->integer('viewed')->comment('How many times was this widget displayed using shortcode?');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('widgets', function (Blueprint $table) {
$table->dropColumn('viewed');
});
}
}
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddNumberOfViewsToWidgetAreas extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('widget_areas', function (Blueprint $table) {
$table->integer('viewed')->comment('How many times was this widget area rendered?');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('widget_areas', function (Blueprint $table) {
$table->dropColumn('viewed');
});
}
}