hti laravel route from javascript file
Here is what the above code is Doing:
1. We’re creating a new route called delete_post.
2. We’re passing the post_id as a parameter.
3. We’re creating a new variable called deletePostUri and assigning it the value of the route.
4. We’re passing the deletePostUri variable to the deletePost.js file.
Now, let’s create the deletePost.js file.
resources/assets/js/deletePost.js