fix seeding for testing

This commit is contained in:
Zain Fauzan Rofie Azizi
2018-06-12 15:23:17 +08:00
parent 8037733f2e
commit 5fecbf8ade
9 changed files with 76 additions and 32 deletions
+6
View File
@@ -14,4 +14,10 @@ class Company extends Model
{
return $this->belongsTo('App\User');
}
public function deliveryinfo() {
return $this->hasMany('App\Deliveryinfo');
}
}
+3 -2
View File
@@ -17,12 +17,13 @@ class Deliveryinfo extends Model
'country',
'contact_person',
'contact_person_no',
'com_id'
];
public function company() {
return $this->belongsTo(App\Company);
return $this->belongsTo('App\Company');
}
}
}
@@ -4,7 +4,7 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Deliveryinfo;
use Auth;
class DeliveryinfoController extends Controller
{