samedi 30 septembre 2017

how to get collaborators with project id in Laravel 5.2 in the localhost

I am developing project management application using Laravel 5.2. in My application side bar menus as sidebar.blade.php witch located in views\layouts\partials\sidebar.blade.php

<li><a href="#">Edit Account</a></li>
    <li><a href="">Projects</a></li>
    <li><a href="">Collaborators</a></li>
    <li><a href="#">Todos</a></li>

when I click project link in the sidebar pages view existing pages. and now I need add some collaborators to each project when click collaborators link in the sidebar. my collaborators form in view/collaborators/form

 <div class="col-md-4" style="border:1px solid #ccc;margin-left:15px;padding:10px;">
                <h4 class="page-header">
                    Collaborators
                </h4>
                <form class="form-vertical" role="form" method="post" action="">
                <div class="form-group">
                    <label> Add New </label>
                    <input type="text" name="task_name" class="form-control" id="name" value="">
                    @if ($errors->has('task_name'))
                        <span class="help-block"></span>
                    @endif
                </div>

                <div class="form-group">
                    <button type="submit" class="btn btn-info">Add User</button>
                </div>
                <input type="hidden" name="_token" value="">
                </form>
</div>

my problem is this i need consider when I am in project 10 and I click collaborator link and then I need following localhost url

localhost:8000/project/10/collaborators

My existing routes is this
Route::get('/collaborators', function(){ 
   return view('collaborators.form'); 
})->name('collaborators.form');

but it is generated only localhost url as

http://localhost:8000/collaborators

how can I manages this?



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

Aucun commentaire:

Enregistrer un commentaire