Capture and Store GA Code

Capture and store a Google Analytics code per organiser.
This commit is contained in:
James Mowatt 2016-09-16 23:29:06 +01:00
parent fc5705afb6
commit a98a7835d8
3 changed files with 39 additions and 1 deletions

View File

@ -45,6 +45,7 @@ class OrganiserCustomizeController extends MyBaseController
$organiser->name = $request->get('name');
$organiser->about = $request->get('about');
$organiser->google_analytics_code = $request->get('google_analytics_code');
$organiser->email = $request->get('email');
$organiser->enable_organiser_page = $request->get('enable_organiser_page');
$organiser->facebook = $request->get('facebook');

View File

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddGoogleAnalyticsCodeToOrganiser extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('organisers', function (Blueprint $table) {
$table->string('google_analytics_code')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('organisers', function (Blueprint $table) {
$table->dropColumn('google_analytics_code');
});
}
}

View File

@ -93,7 +93,13 @@
'rows' => 4
)) !!}
</div>
<div class="form-group">
{!! Form::label('google_analytics_code', 'Organiser Analytics Code', array('class'=>'control-label')) !!}
{!! Form::text('google_analytics_code', Input::old('google_analytics_code'),
array(
'class'=>'form-control'
)) !!}
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">