Commit 9328b545 by hannan

add migration files, model files and changes

parent 7466407f
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOverheadTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('overhead', function (Blueprint $table) {
$table->increments('id');
$table->integer('o_id')->nullable()->unsigned();
$table->string('o_overhead_desc',50)->nullable();
$table->integer('o_overhead_sts')->nullable()->unsigned();
$table->timestamps();
$table->integer('updated_by')->nullable();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('overhead');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeDatatypePProjectCodeInProjectTbl extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('project', function (Blueprint $table) {
$table->string('p_project_code', 50)->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('project', function (Blueprint $table) {
//
});
}
}
......@@ -27,7 +27,10 @@ input[type=number] {
<th colspan="2">Chargeable</th>
<th colspan="15" class="center aligned">Date</th>
<th>
<button type="submit" class="center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save
</button>
</th>
</tr>
<tr>
......@@ -51,9 +54,11 @@ input[type=number] {
<td>
{{$projectname}}
</td>
<td colspan="15">
@for($i = 0; $i < 15 ; $i++)
<td >
<input type="number" onkeypress="onlynumber(event)" name="tm_chargeable_hrs" min="0" max="24" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this);">
</td>
@endfor
<td>
<input type="number" onkeypress="onlynumber(event)" name="" style="padding-right: 4px;padding-left: 4px;" onchange="limiter(this);" readonly="">
</td>
......@@ -62,10 +67,7 @@ input[type=number] {
</tbody>
</table>
<button type="submit" class="center aligned ui blue compact labeled icon button">
<i class="save icon"></i>
Save
</button>
</form>
</div>
......
......@@ -6,7 +6,7 @@ use Illuminate\Routing\Controller;
use Carbon\Carbon;
use DB;
use Portal\Timesheet\Model\Users;
use Portal\Timesheet\Model\ts_master;
use Portal\Timesheet\Model\Ts_master;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use File;
......@@ -101,7 +101,7 @@ class DashboardController extends Controller
{
// dd($request);
$data = new ts_master;
$data = new Ts_master;
$data -> tm_chargeable_hrs = $request -> tm_chargeable_hrs;
$data -> save();
return redirect('home');
......
<?php
namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
class Project extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'project';
/**
* undocumented function
*
* @return void
* @author
**/
public function info()
{
}
}
......@@ -4,7 +4,7 @@ namespace Portal\Timesheet\Model;
use Illuminate\Database\Eloquent\Model;
class ts_master extends Model
class Ts_master extends Model
{
/**
* The database table used by the model.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment