diff options
| author | Camil Staps | 2016-05-10 23:27:22 +0200 | 
|---|---|---|
| committer | Camil Staps | 2016-05-10 23:27:22 +0200 | 
| commit | 520b977a27d016a84cb105035a173d64e4629b40 (patch) | |
| tree | 6a6ed7ee69ce735ee1785b6165c301947a74e8d4 /app/RandomLog.php | |
| parent | Fix (diff) | |
Added logging of random requests
Diffstat (limited to 'app/RandomLog.php')
| -rw-r--r-- | app/RandomLog.php | 35 | 
1 files changed, 35 insertions, 0 deletions
| diff --git a/app/RandomLog.php b/app/RandomLog.php new file mode 100644 index 0000000..a90018c --- /dev/null +++ b/app/RandomLog.php @@ -0,0 +1,35 @@ +<?php +/** + * HebrewParseTrainer - practice Hebrew verbs + * Copyright (C) 2015  Camil Staps <info@camilstaps.nl> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program.  If not, see <http://www.gnu.org/licenses/>. + */ +namespace HebrewParseTrainer; + +use Illuminate\Database\Eloquent\Model; + +class RandomLog extends Model { + +	protected $table = 'random_logs'; +	public $timestamps = false; +	protected $fillable = ['request', 'response']; +		 +		public static function boot() { +		static::creating(function ($model) { +			$model->created_at = $model->freshTimestamp(); +		}); +	} + +} | 
