lundi 27 juin 2016

Laravel button does not link to route

@extends('layout')

@section('content')
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <h1></h1>

            <ul class="list-group">
                @foreach($id->notes as $note)
                    <li class="list-group-item">
                        
                        <span class="pull-right">
                                <button href="/notes//edit" type="button" class="label label-default pull-xs-right">Edit</button>
                        </span>
                    </li>
                @endforeach
            </ul>

            <hr>
            <h3>Add a New Note</h3>

            <div class="form-group">
                <form method="post" action="/cards//notes">
                    <div class="form-group">
                        <textarea name="body" class="form-control"></textarea>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary">Add Note</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
@stop

The button in the foreach loop has the correct link, /note/id/edit. I can type that into chrome and go to the edit page. However, the button does not head there. I just see the click animation. Why would this be?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/29iviw8
via IFTTT

Aucun commentaire:

Enregistrer un commentaire