From 3314e3eb3353cce5b07e10d52ae3934864207752 Mon Sep 17 00:00:00 2001 From: aqeebimtiaz Date: Tue, 24 Apr 2018 14:19:14 +0800 Subject: [PATCH] company migration --- app/Company.php | 10 +++++ app/Http/Controllers/CompanyController.php | 10 +++++ composer.lock | 2 +- config/database.php | 2 +- ...18_04_24_034401_create_companies_table.php | 42 +++++++++++++++++++ 5 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 app/Company.php create mode 100644 app/Http/Controllers/CompanyController.php create mode 100644 database/migrations/2018_04_24_034401_create_companies_table.php diff --git a/app/Company.php b/app/Company.php new file mode 100644 index 0000000..46c5dd0 --- /dev/null +++ b/app/Company.php @@ -0,0 +1,10 @@ + 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), + 'database' => env('DB_DATABASE', 'forgzze'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), diff --git a/database/migrations/2018_04_24_034401_create_companies_table.php b/database/migrations/2018_04_24_034401_create_companies_table.php new file mode 100644 index 0000000..eda932e --- /dev/null +++ b/database/migrations/2018_04_24_034401_create_companies_table.php @@ -0,0 +1,42 @@ +increments('id'); + $table->string('company-name'); + $table->string('registration-no'); + $table->string('tax-no'); + $table->string('tel-no'); + $table->string('fax'); + $table->string('address'); + $table->string('city'); + $table->string('postcode'); + $table->string('state'); + $table->string('country'); + $table->string('contact-person'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('companies'); + } +}