Add symbol field to currencies migration
MODIFY
app/User.php
app/User.php
@@ -34,4 +34,8 @@ class User extends Authenticatable
public function spendings() {
return $this->hasMany('App\Spending');
}
+
+ public function currency() {
+ return $this->belongsTo('App\Currency');
+ }
}

MODIFY
database/migrations/2017_08_04_004838_create_currencies_table.php
database/migrations/2017_08_04_004838_create_currencies_table.php
@@ -9,6 +9,7 @@ class CreateCurrenciesTable extends Migration {
Schema::create('currencies', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
+ $table->string('symbol');
});
}

Add symbol field to currencies migration