Merge branch 'develop' into trunk
This commit is contained in:
commit
03d9bfeb30
3 changed files with 34 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -25,6 +25,9 @@ npm-debug.log
|
|||
yarn-error.log
|
||||
.npmrc
|
||||
/tests/coverage
|
||||
.zshrc
|
||||
.npm/
|
||||
.composer/
|
||||
|
||||
# Ignore public favicon
|
||||
/public/android-chrome-192x192.png
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ class Customer extends Authenticatable implements MustVerifyEmail
|
|||
*/
|
||||
public function recipes(): \Illuminate\Database\Eloquent\Relations\MorphToMany
|
||||
{
|
||||
return $this->morphedByMany(Recipe::class, 'customerable')->with('products', 'consumptionMoment');
|
||||
return $this->morphedByMany(Recipe::class, 'customerable')->with('products', 'consumptionMoment')->withTimestamps();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -510,7 +510,7 @@ class Customer extends Authenticatable implements MustVerifyEmail
|
|||
*/
|
||||
public function products(): \Illuminate\Database\Eloquent\Relations\MorphToMany
|
||||
{
|
||||
return $this->morphedByMany(Product::class, 'customerable');
|
||||
return $this->morphedByMany(Product::class, 'customerable')->withTimestamps();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -520,6 +520,6 @@ class Customer extends Authenticatable implements MustVerifyEmail
|
|||
*/
|
||||
public function surveyAnswers(): \Illuminate\Database\Eloquent\Relations\MorphToMany
|
||||
{
|
||||
return $this->morphedByMany(SurveysAnswer::class, 'customerable')->with('newsClub');
|
||||
return $this->morphedByMany(SurveysAnswer::class, 'customerable')->with('newsClub')->withTimestamps();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('customerables', function (Blueprint $table) {
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('customerables', function (Blueprint $table) {
|
||||
$table->dropTimestamps();
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue