samedi 5 mars 2022

how can i store all details on login base

This is user profile when user click on refund button then store all data of user in another table how its possible?

this is my controller

 public function refundstore(Request $request)
{
    
   $user_id = Auth::user()->id
    $refund = new Refund(); 

$refund->user_id = $id;
$refund->refund_id = $refund->id; 

$refund->save();
    return view('front.user.profile', compact('user_id', 'refund'));
}

This is view

 <form action="" method="post">
              @csrf
            <button class="applyRefund mt-2">Apply For Refund</button>
           </form>

This is route

Route::post('refundstore', ['as' => 'refundstore', 'uses' => 'RefundController@refundstore']);


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/AlyRTFx
via IFTTT

Aucun commentaire:

Enregistrer un commentaire