Skip to content

Commit

Permalink
payment info update option added
Browse files Browse the repository at this point in the history
payment info update option added
  • Loading branch information
Sharifur committed Feb 29, 2024
2 parents 97775dc + ade142e commit 33616bf
Show file tree
Hide file tree
Showing 86 changed files with 570 additions and 461 deletions.
14 changes: 14 additions & 0 deletions app/Http/Controllers/User/UserDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use App\Models\Employee;
use App\Models\User;
use Illuminate\Http\Request;
use Inertia\Inertia;
Expand All @@ -15,6 +16,19 @@ public function index(){
]);
}

public function update_payment_info(Request $request){
if (strtolower($request->method()) === 'post'){
$request->validate([
'paymentInfo' => 'required|max:500'
]);
Employee::where('user_id',auth('web')->id())->update([
'paymentInfo' => $request->paymentInfo
]);
return back();
}
return Inertia::render('User/PaymentInfo');
}

public function change_password(){
return Inertia::render('User/ChangePassword');
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 33616bf

Please sign in to comment.