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_06_08_051127_add_expense_to_payrolls.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddExpenseToPayrolls extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('payrolls', function(Blueprint $table) { $table->string('expense'); $table->unsignedInteger("company_id"); $table->foreign("company_id")->references("id")->on("companies")->onUpdate("cascade")->onDelete("cascade"); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('payrolls', function(Blueprint $table) { $table->dropColumn('expense'); }); } }