Click here to Skip to main content
15,899,314 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Web API Security Pin
User 41802544-Apr-19 9:52
User 41802544-Apr-19 9:52 
QuestionMVC5 validation decoration Pin
#realJSOP1-Apr-19 0:55
professional#realJSOP1-Apr-19 0:55 
AnswerRe: MVC5 validation decoration Pin
#realJSOP1-Apr-19 2:07
professional#realJSOP1-Apr-19 2:07 
GeneralRe: MVC5 validation decoration Pin
malkovich198823-Apr-19 5:08
malkovich198823-Apr-19 5:08 
QuestionIs there a basic HTML scripts bundle for VS code and none serve application? Pin
maze327-Mar-19 5:05
professionalmaze327-Mar-19 5:05 
AnswerRe: Is there a basic HTML scripts bundle for VS code and none serve application? Pin
Shmuel Zang28-Mar-19 4:08
Shmuel Zang28-Mar-19 4:08 
AnswerRe: Is there a basic HTML scripts bundle for VS code and none serve application? Pin
Richard MacCutchan28-Mar-19 5:02
mveRichard MacCutchan28-Mar-19 5:02 
QuestionExperimenting Pin
Member 1419652225-Mar-19 20:42
Member 1419652225-Mar-19 20:42 
AnswerRe: Experimenting Pin
maze327-Mar-19 5:14
professionalmaze327-Mar-19 5:14 
QuestionCopy and Paste to aspx GridView Pin
Wayne Hollier20-Mar-19 1:30
Wayne Hollier20-Mar-19 1:30 
AnswerRe: Copy and Paste to aspx GridView Pin
Richard Deeming20-Mar-19 13:02
mveRichard Deeming20-Mar-19 13:02 
GeneralRe: Copy and Paste to aspx GridView Pin
Wayne Hollier22-Mar-19 1:12
Wayne Hollier22-Mar-19 1:12 
QuestionNo action was found on the controller Pin
Kevin Marois18-Mar-19 15:16
professionalKevin Marois18-Mar-19 15:16 
AnswerRe: No action was found on the controller Pin
Richard Deeming19-Mar-19 2:16
mveRichard Deeming19-Mar-19 2:16 
QuestionTemplate engine (Ejs) Pin
Member 1418486016-Mar-19 20:43
Member 1418486016-Mar-19 20:43 
QuestionHosting WebAPI OnServer Pin
Kevin Marois12-Mar-19 14:09
professionalKevin Marois12-Mar-19 14:09 
AnswerRe: Hosting WebAPI OnServer Pin
Nathan Minier18-Mar-19 1:55
professionalNathan Minier18-Mar-19 1:55 
QuestionWhy my update & insert form return url+token instead of insert/update data (laravel) Pin
Galih indra waspada11-Mar-19 23:29
Galih indra waspada11-Mar-19 23:29 
I'm working on simple crud in laravel.I already built Controller,form, and model.But everytime i click the submit input.They always return this url and show 404 not found error,instead of insert the data.Can someone help me to find the problem?i have no clue about this part.

http://127.0.0.1:8000/POST?_token=bD5c3O0XpfTX7NWL7RA7wXSw3rWrQ12fbGLMw0kf&kode=galih&nama=galih&submit=Submit[^]

I set the route using Route::resource('urusan','MasterUrusanController)
Insert Form
<form action="POST" action="{{url('urusan')}}">
{{ csrf_field() }}
<table>
    <thead>
        <tr>
            <td>Kode Urusan</td>
            <td><input type="text" name="kode"></td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Nama Urusan</td>
            <td><input type="text" name="nama"></td>
        </tr>
        <tr>
            <td colspan="2" align="center"><input type="submit" name="submit" class="btn btn-primary" value="Submit"></td>
        </tr>
    </tbody>
</table>
</form>


Insert Form
<form action="POST" action="{{route('urusan.update',$urusan->kode_urusan)}}">
             {{ method_field("PUT") }}
       {{ csrf_field() }}
           <thead>
               <tr>
                   <td>Kode Urusan</td>
               <td><input type="text" name="kode" value="{{$urusan->kode_urusan}}"></td>
               </tr>
           </thead>
           <tbody>
               <tr>
                   <td>Nama Urusan</td>
                   <td><input type="text" name="nama" value="{{$urusan->nama_urusan}}"></td>
               </tr>
               <tr>
                   <td colspan="2" align="center"><input type="submit" name="submit" class="btn btn-primary" value="Update"></td>
               </tr>
           </tbody>

           </form>

       </table>



Controller

class MasterUrusanController extends Controller
{
    public function index()
    {
        $urusan=MasterUrusan::all();
        return view('master_urusan.select',['urusan'=>$urusan]);
        //return View::make('master_urusan.select')->with('urusan',$urusan);
    }

    public function create()
    {
        return view('master_urusan.insert') ;
    }

    public function store(Request $request)
    {
        $data=new MasterUrusan();
        $data->nama = $request->get('kode');
        $data->nama = $request->get('nama');
        $data->save();
        return redirect('/urusan');
    }

    public function edit($kode_urusan)
    {

        
        $data = MasterUrusan::where('kode_urusan','=',$kode_urusan)->firstOrFail();
        return view('master_urusan.update', ['urusan' => $data]);
    }
    public function update(Request $request,$kode_urusan)
    { 
        $data = MasterUrusan::where('kode_urusan','=',$kode_urusan)->firstOrFail();
        $data->nama = $request->get('nama');
        $data->save();
        return redirect('/urusan');
        
    }

    public function destroy($kode_urusan)
    {
        $data = MasterUrusan::where('kode_urusan','=',$kode_urusan)->firstOrFail();
        $data->delete();
        return redirect('/urusan');
    }
}


modified 12-Mar-19 5:47am.

AnswerRe: Why my update & insert form return url+token instead of insert/update data (laravel) Pin
Richard Deeming12-Mar-19 2:52
mveRichard Deeming12-Mar-19 2:52 
QuestionProblem on Opening Password-Protected ZIP File that created on Heroku Server ( Python App ) Pin
Mostafazs11-Mar-19 18:10
Mostafazs11-Mar-19 18:10 
QuestionModal popup from web page during long processing task Pin
Member 1413757611-Mar-19 15:23
Member 1413757611-Mar-19 15:23 
AnswerRe: Modal popup from web page during long processing task Pin
Richard Deeming12-Mar-19 2:48
mveRichard Deeming12-Mar-19 2:48 
Questiondiv width not working Pin
V.11-Mar-19 2:53
professionalV.11-Mar-19 2:53 
AnswerRe: div width not working Pin
Richard Deeming11-Mar-19 8:53
mveRichard Deeming11-Mar-19 8:53 
GeneralRe: div width not working Pin
V.11-Mar-19 21:27
professionalV.11-Mar-19 21:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.