diff --git a/app/Http/Controllers/LelongController.php b/app/Http/Controllers/LelongController.php index b0b83381..0fe76145 100644 --- a/app/Http/Controllers/LelongController.php +++ b/app/Http/Controllers/LelongController.php @@ -446,9 +446,9 @@ class LelongController extends Controller foreach($lelongbid as $bid) { - $gadai = Gadai::where('norujukan', $bid['norujukan'])->first(); - $gadai->taglel = 0; - $gadai->update(); + // $gadai = Gadai::where('norujukan', $bid['norujukan'])->first(); + // $gadai->taglel = 0; + // $gadai->update(); //insert loguser $loguser = new LogUser; diff --git a/app/Http/Controllers/NotisController.php b/app/Http/Controllers/NotisController.php index c0be590b..94fedd2d 100644 --- a/app/Http/Controllers/NotisController.php +++ b/app/Http/Controllers/NotisController.php @@ -172,22 +172,67 @@ class NotisController extends Controller return view('jananotis.kemaskininotis',compact('tetapan')); } + public function storeall(Request $request) { - public function store(Request $request) - { - - - //create tetapan - $tetapan = Tetapan::find(1); - $tetapan->para2 = $request->para2; - $tetapan->update(); + // dd($request->all()); + $tetapan = Tetapan::find(1); + + $tetapan->para2 = $request->para2; + $tetapan->update(); + $cawangan = Cawangan::all(); + + foreach($cawangan as $updatecaw){ + + $update = Cawangan::where('id', $updatecaw['id']) + ->update(['para2'=>$request->para2]); + // $update->para2 = $request->para2; + // $update->update(); + + } + return redirect()->route('jananotis.kemaskininotis') ->with('success','Kemaskini Berjaya'); } + + public function store(Request $request) + { + + // dd($request->all()); + $tetapan = Tetapan::find(1); + + $tetapan->para2 = $request->para2; + $tetapan->update(); + + $cawangan = Cawangan::all(); + + foreach($cawangan as $updatecaw){ + + $update = Cawangan::where('id', $updatecaw['id']) + ->where('caw_code', $request->kodcaw) + ->update(['para2'=>$request->para2]); + // $update->para2 = $request->para2; + // $update->update(); + + } + + return redirect()->route('jananotis.kemaskininotisbycaw') + ->with('success','Kemaskini Berjaya'); + + + } + + Public function kemaskininotisbycaw (Request $request){ + + $caw = Cawangan::all(); + + return view('jananotis.kemaskininotisbycaw',compact('caw')); + + + } } \ No newline at end of file diff --git a/app/Models/Cawangan.php b/app/Models/Cawangan.php index aa45d064..c1492b33 100644 --- a/app/Models/Cawangan.php +++ b/app/Models/Cawangan.php @@ -27,5 +27,6 @@ class Cawangan extends Model 'nofaks', 'lokasi', 'pkb_jmc', + 'para2', ]; } diff --git a/database/migrations/2021_12_14_041557_create_lelongs_table.php b/database/migrations/2021_12_14_041557_create_lelongs_table.php index ab91f002..7b37c59d 100644 --- a/database/migrations/2021_12_14_041557_create_lelongs_table.php +++ b/database/migrations/2021_12_14_041557_create_lelongs_table.php @@ -173,6 +173,8 @@ class CreateLelongsTable extends Migration $table->string('kali')->nullable(); $table->integer('cajlelong')->nullable(); $table->timestamps(); + $table->string('para2')->nullable(); + // $table->foreign('norujukan') // ->references('norujukan')->on('gadai') diff --git a/resources/views/includes/sidebar.blade.php b/resources/views/includes/sidebar.blade.php index 777b7d4b..c3e9539a 100644 --- a/resources/views/includes/sidebar.blade.php +++ b/resources/views/includes/sidebar.blade.php @@ -256,9 +256,21 @@ {{-- end laporan --}} {{-- Kemaskini Notis --}} -
{{ $message }}
@endif -