Click here to Skip to main content
15,745,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a button inside the table what I'm trying to do is when the accept button is clicked, it will be deleted in the current table and will be transferred in another table. problem is that when i click the button it redirects to a page with 404 not found with a URL of "127.0.0.1:8000/'name_of_action'"

blade view
@foreach($list as $reqlist)
<tr id="tr-studentappeal-coursegrade">
    <td id="td-studentappeal-coursegrade">{{$reqlist['transno']}}</td>
    <td id="td-studentappeal-coursegrade">{{$reqlist['student_number']}}</td>
    <td id="td-studentappeal-coursegrade">{{$reqlist['name']}}</td>
    <td id="td-studentappeal-coursegrade">{{$reqlist['email']}}</td>
    <td id="td-studentappeal-coursegrade">{{$reqlist['section']}}</td>
    <td id="td-studentappeal-coursegrade">{{$reqlist['program']}}</td>
    <td id="td-studentappeal-coursegrade">{{$reqlist['active_contact']}}</td>
    <td id="td-studentappeal-coursegrade">{{$reqlist['active_email']}}</td>
    <td id="td-studentappeal-coursegrade"><a href='evalstudap?id={{$reqlist['transno']}}'><input id="SA-CG-Evaluate" type="submit" value="Open"  name="Open"></a></td>

    <td id="td-studentappeal-coursegrade">
        <form action='accept' method='post'>
        @csrf
        <input id="SA-CG-Accept" type="submit" value="Accept" name='accept' value="{{ csrf_token() }}">
        </form>

    <input id="SA-CG-Decline" type="submit" value="Decline" name='decline'></td>

    <td id="td-studentappeal-coursegrade"> <input id="start-consul" type="submit" name="View"></td>

</tr>
@endforeach


controller

function show() {

       $data = studapforms::all();
       return view('/studap/admin/reqlist-studentappeal', ['list' => $data]);
   }

   public function accept(Request $request){

       $data = studapforms::all();
       return view('/studap/admin/reqlist-studentappeal', ['list' => $data]);
   }


What I have tried:

i havent tried anything because this is all i know. please help me
Posted
Comments
My Jinji 12-Jul-21 5:31am    
forgot to add the web.php

Route::get('/studapreq', [StudApController::class, 'show']);
Route::any('/studapreq', [StudApController::class, 'accept']);
SeeSharp2 12-Jul-21 14:13pm    
It does not look like you have your forms setup properly.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900