Customer documents bug fix
This commit is contained in:
parent
6c003f949f
commit
76742eff85
|
|
@ -22,7 +22,7 @@ class CustomerDocumentsTable extends Migration
|
|||
$table->string('path');
|
||||
$table->integer('customer_id')->default(0);
|
||||
$table->integer('company_id')->unsigned();
|
||||
$table->foreign('company_id')->references('id')->on('customer_documents')->onDelete('cascade');
|
||||
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Webkul\CustomerDocument\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Webkul\CustomerDocument\Contracts\CustomerDocument as CustomerDocumentContract;
|
||||
use Company;
|
||||
|
||||
class CustomerDocument extends Model implements CustomerDocumentContract
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\CustomerDocument\Observers\Attribute;
|
||||
namespace Webkul\CustomerDocument\Observers;
|
||||
|
||||
use Webkul\CustomerDocument\Models\CustomerDocument;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class CustomerDocumentServiceProvider extends ServiceProvider
|
|||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
|
||||
|
||||
\Webkul\CustomerDocument\Models\CustomerDocument::observe(\Webkul\CustomerDocument\Observers\CustomerDocument::class);
|
||||
\Webkul\CustomerDocument\Models\CustomerDocument::observe(\Webkul\CustomerDocument\Observers\CustomerDocumentObserver::class);
|
||||
|
||||
$this->app->register(ModuleServiceProvider::class);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue