Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/izyim-api into companyFrontend

# Conflicts:
#	public/company-profile.html
This commit is contained in:
Aqeeb Imtiaz Harun
2018-05-30 10:57:18 +08:00
18 changed files with 259 additions and 223 deletions
+30
View File
@@ -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()
{
//
}
}