Answers for "laravel route segment"

PHP
1

laravel get url segment

{{ Request::segment(1) }}
Posted by: Guest on November-06-2020
1

delete route method in laravel

<form method="POST" action="{{ route('route.name', [ 'id'=> $item->id ]) }}">
              @csrf
              <input type="hidden" name="_method" value="DELETE">
              <button type="submit" class="btn btn-danger btn-icon">
                <i data-feather="delete"></i>
              </button>
            </form>
Posted by: Guest on October-18-2020
0

laravel routes return view in web.php

Route::get("/page", function(){
   return View::make("dir.page");
});
Posted by: Guest on May-07-2020
0

laravel route

Route::get('posts/{post}/comments/{comment}', function ($postId, $commentId) {
    //
});
Posted by: Guest on April-22-2020

Browse Popular Code Answers by Language