ongoing task

This commit is contained in:
Zain Fauzan Rofie Azizi
2018-05-16 14:32:54 +08:00
parent 525a313676
commit 88605f2ec4
6 changed files with 221 additions and 4 deletions
@@ -0,0 +1,86 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Warehousearr;
use App\Warehouseitem;
class WarehousearrangementController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Warehousearr extends Model
{
protected $fillable = [
'id',
'so_id',
'receive_on',
'transport_company_name',
'consignment_note_no',
'warehouse_receive_note_no',
'receiving_person',
'marking_number',
'image',
];
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Warehouseitem extends Model
{
protected $fillable = [
'id',
'description',
'nominal_ctn',
'actual_ctn',
'nominal_measurement',
'actual_measurement',
'nominal_weight',
'actual_weight',
'balance',
'status',
'image',
];
}
@@ -0,0 +1,41 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWarehousearrsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('warehousearrs', function (Blueprint $table) {
$table->increments('id');
$table->integer('so_id');
$table->date('receive_on');
$table->string('transport_company_name');
$table->integer('consignment_note_no');
$table->integer('warehouse_receive_note_no');
$table->string('receiving_person');
$table->integer('marking_number');
$table->string('image');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('warehousearrs');
}
}
@@ -0,0 +1,44 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWarehouseitemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('warehouseitems', function (Blueprint $table) {
$table->increments('id');
$table->string('description');
$table->integer('nominal_ctn');
$table->integer('actual_ctn');
$table->integer('nominal_measurement');
$table->integer('actual_measurement');
$table->integer('nominal_weight');
$table->integer('actual_weight');
$table->string('balance');
$table->string('isDamaged');
$table->string('status');
$table->string('image');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('warehouseitems');
}
}
+6 -4
View File
@@ -14,13 +14,15 @@ use Illuminate\Http\Request;
*/
//route for the Warehouse-receive-note
Route::get('/warehousearr','WarehousearrController@index');//view the list of wrn
Route::get('/warehousearr/{wa_id}','warehousearrController@getwrn');//view the single wrn
Route::get('/so','WarehousearrController@index');//view the list of wrn
Route::get('/warehousearr/{wa_id}','warehousearrController@getwrn');//view the wrn
Route::post('/warehousearr/{wa_id}','WarehousearrController@store');//store the new wrn
Route::put('/warehouserarr/{wa_id}','WarehousearrController@update');//update the wrn
Route::post('/decision-request','WarehousearrController@request');//decision request the wrn
Route::post('/decision-reject','WarehousearrController@reject');//reject the wrn
Route::delete('/warehouserarr/{wa_id}','WarehousearrController@delete');//update the wrn
Route::post('/decision-request/{wa_id}','WarehousearrController@request');//decision request the wrn
Route::post('/decision-reject/{wa_id}','WarehousearrController@reject');//decision reject the wrn
//Route::middleware('auth:api')->get('/user', function (Request $request) {