Can edit and set location for accounts.

This commit is contained in:
James Cole
2019-12-30 12:12:08 +01:00
parent 71f2cacdbd
commit 54b049e106
24 changed files with 15310 additions and 785 deletions

View File

@@ -27,6 +27,7 @@ use FireflyIII\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -91,7 +92,18 @@ class Tag extends Model
'longitude' => 'float',
];
/** @var array Fields that can be filled */
protected $fillable = ['user_id', 'tag', 'date', 'description', 'latitude', 'longitude', 'zoomLevel', 'tagMode'];
protected $fillable = ['user_id', 'tag', 'date', 'description'];
protected $hidden = ['zoomLevel', 'latitude', 'longitude'];
/**
* @codeCoverageIgnore
* @return MorphMany
*/
public function locations(): MorphMany
{
return $this->morphMany(Location::class, 'locatable');
}
/**
* Route binder. Converts the key in the URL to the specified object (or throw 404).