I am working with laravel 5.2 and I am developing project management tool. in my application I have projects and each project have tasks and one task may have sub tasks. in each task I have button to create subtasks as following,
<a href="" class="editInline"><i class="glyphicon glyphicon-plus"></i></a>
when I view my tasks list witch related to each project my url is as following.
http://localhost:8000/projects/1
now i have subtask form in subtasks folder of view file to enter sub tasks to each task
subtasks/subtask.blade.php
now I need when I click sub task enter button redirect subtask blade file as url is this way.
http://localhost:8000/projects/1/task/1/subtask
how can I manage href of sub task add button
<a href="" class="editInline"><i class="glyphicon glyphicon-plus"></i></a>
and My routes? Updated this is my subtask input form
<form class="form-vertical" role="form" method="post" action="{{ route('projects/{projectId}/task/{taskId}/subtask')}}">
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<input type="text" name="task_name" class="form-control" id="name" value="{{ old('task_name') ?: '' }}">
@if ($errors->has('task_name'))
<span class="help-block">{{ $errors->first('task_name') }}</span>
@endif
</div>
<div class="form-group">
<button type="submit" class="btn btn-info">Create Task</button>
</div>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</form>
is my subtask form action correct?