Customer documents bug fix

This commit is contained in:
Prashant Singh 2019-06-29 15:41:57 +05:30
parent 6c003f949f
commit 76742eff85
4 changed files with 4 additions and 3 deletions

View File

@ -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();
});
}

View File

@ -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
{

View File

@ -1,6 +1,6 @@
<?php
namespace Webkul\CustomerDocument\Observers\Attribute;
namespace Webkul\CustomerDocument\Observers;
use Webkul\CustomerDocument\Models\CustomerDocument;

View File

@ -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);