mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-21 21:44:18 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/izyim-api into companyFrontend
# Conflicts: # public/company-profile.html
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This directory should contain each of the model factory definitions for
|
||||
| your application. Factories provide a convenient way to generate new
|
||||
| model instances for testing / seeding your application's database.
|
||||
|
|
||||
*/
|
||||
// Manually creating the relationship tree.
|
||||
$factory->define(App\Company::class, function (Faker $faker) {
|
||||
return [
|
||||
'company_name'=>'testing',
|
||||
'registration_no'=>'testing',
|
||||
'tax_no'=>'testing',
|
||||
'tel_no'=>'12345',
|
||||
'fax'=>'12345',
|
||||
'address'=>'testing',
|
||||
'city'=>'testing',
|
||||
'postcode'=>'testing',
|
||||
'state'=>'testing',
|
||||
'country'=>'testing',
|
||||
'contact_person'=>'testing'
|
||||
];
|
||||
});
|
||||
@@ -25,6 +25,6 @@ class ChangeEmailToMobileFromUser extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$table->renameColumn('phone', 'email');
|
||||
//$table->renameColumn('phone', 'email');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddUserToCompanyTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user