I am using fortify for creating and logging-in users. So as I add a new column ‘role’ in my database as well as in the model. I face this kind of error when signing-up a new user. Somehow, the user information will still be registered and stored in the database but an error is shown as I click Register. How
Tag: laravel
The most efficient way to do eagerload in Laravel Policy for yajra-datatable use
I need to eager load relationship within laravel policy The problem is i use the laravel policy inside yajra-datatable which will load it (the policies) line by line Here’s the code looks like : and i use it in my yajra-datatable like so : so every line will load the relation again and again I’m expecting more efficient way to
unable to get response form an API in Laravel [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 4 months ago. Improve this question I am getting null response in laravel after dd(); ,however in Postman i
Remove A|B duplicates from associative array in Laravel
I have an associative array containing entries that are virtually the same, except the key-value pairs are swapped: I stored the array in a Laravel collection and tried using ->unique() but the output matches the array feeding in. How can I remove duplicates like this from an array so each pair is unique no matter if the keys are swapped?
Why my dataProvider function in my unit test file is not working properly?
I want to test this function: Inside my unit test file, I have these functions: And finally, I have these errors: Expectation failed for method name is “get” when invoked zero or more times Parameter 0 for invocation IlluminateHttpRequest::get(‘address1′, null): mixed does not match expected value. Failed asserting that two strings are equal. Expected :’address2′ Actual :’address1’ Expectation failed for
Laravel Livewire is including tag twice
I’ve been following the Livewire docs and screencasts to build my new app, but I could be doing something wrong because the <head> tag is been included twice. Here is my code: routesweb.php AppHttpLivewireUserAll.php AppViewComponentsUserLayout.php resourseviewslayoutsuser.blade.php resourseviewslivewireuserall.blade.php If I remove the <x-user-layout> tag in the blade, the problem seems to be fixed, but then livewire doesn’t work. I’ve tried many
Passing 2 parameters in ajax url in Laravel route
I need help, my ajax request doesn’t work if i use 2 parameters in url but if i only use 1 parameter it works perfectly fine. There isn’t error in the first one but i think it does not reach to the controller because the output in response is undefined. this is my view this is my ajax request when
Getting http://127.0.0.1:8000/route(‘welcome’) instead of http://127.0.0.1:8000/ in laravel 9
I’ve come across a peculiar bug in a laravel project of mine, In my web.php I have a named route ‘welcome’ : This route contain my index page in which there’s a navigation component. Through an AppServiceProvider I’m passing data to the navigation component The data im passing is a simple table containing this : { name : “home”, href
Laravel is_follower and is_following implementation like with Instagram
In Instagram we can know am i followed account and is this account followed me and in Laravel i created a followers migration to implementing that. here we can attach or detach user_ids to them for example: now my question is how can i know a user followed me and a user is on my following list here i have
How to group some data on basis of two fields in Laravel?
Here I’m trying to keep track of my Employees Skills like when they are added, when removed and then new skills are added. So, I’m getting storing them in the database as follows: Then Retrieving the data as follows: And then showing them in the blade as: So as expected in the browser it shown like this: But I want