Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
gilour
/
database
/
migrations
:
2015_05_23_063217_create_payrolls_table.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreatePayrollsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('payrolls', function(Blueprint $table) { $table->increments('id'); $table->unsignedInteger("employee_id"); $table->foreign('employee_id') ->references('id')->on('employees') ->onUpdate('cascade') ->onDelete('cascade'); $table->string('month'); $table->string('year'); $table->enum('payment_mode',['cash','paypal','bank_transfer','cheque']); $table->string('basic'); $table->string('overtime_hours'); $table->string('overtime_pay'); $table->string('allowances'); $table->string('total_allowance'); $table->string('deductions'); $table->string('total_deduction'); $table->string('additionals'); $table->string('total_additional'); $table->string('net_salary'); $table->date('pay_date'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('payrolls'); } }