Skip to content
Advertisement

Tag: laravel

laravel feature tests with locales

I am new to Laravel and I am having an issue to write a test function that asserts that the HTTP response of my welcome page is 200 knowing that I have EN and FR locales defined, meaning that the test should test both localhost:8000/en and localhost:8000/fr. This is my exampletest.php: I don’t like writing the code twice for both

Laravel only one friend_id per user

I’m only starting with laravel and was wondering if anyone could help, I’ve created a friend_id and user_id from the database and have made a form in the view that adds the user_id to the friend_id (not sure what the terminology is for anything yet XD) everything working fine but each time I press the add friend button the friend

How to update cart item quantitty with ajax in laravel?

I want to increment/decrement cart quantity by clicking the button. See this image preview image This cart row is shown by forcach loop. First row is working perfectly. The problem is, when I click on the seceond/last row, I get only first row value. I don’t know how to solve that. Here is view code Here is ajax code Here

How to get Position of Comment within a Post

So I have a Post which has Comments — I’m trying to get the Comment # position within that post. For example, a Post has 15 comments, I want to be able to get the numerical position (i.e 1 (first post), 2 (second post), 3 (third post), etc, etc), and put this into a function somehow. That way when I

Advertisement