I have unique problem. I already create Route on web.php, on Controller, and Blade. and working on my localhost. but after publish to real server, I jus got error Action urlcontroller@function not define. this is my code. this is my web.php this is my controller and this is code on blade to call controller@function this step same as another controller,
Tag: laravel-8
Laravel: Test not Using Mocked Method
I want getNumber to return 200 in the test case, but when I run the test and inspect the result with $response->dump() I can see that the mock is not overriding the method as it is showing array:1 [0 => 100]. What am I missing? Controller: Model: Test: I am using Laravel 8 and referencing this documentation: https://laravel.com/docs/8.x/mocking#mocking-objects Answer In
how to create an alert if the same data has been added using laravel?
I made an add user feature, but if I add the same data there will be a problem, I want to limit the duplicate data, how to create a warning if the same data has been added? Source Code UserController Screenshot Error Image Answer There are two ways to do it. First is to add ‘unique’ to your validation. For
Laravel blade 3 levels quote issue [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 3 months ago. Improve this question
How to get last record of duplicate data using group by in Laravel SQL
I want to retrieve last record of multiple row of same id using GroupBy in my laravel project. table purchases query in laravel controller output But Only id no 3 will be the output cause only id no 3 purchases id has due amount. How to solve this? Anybody Help please? Answer Looking at your requirement, you can add a
Update not working in Resource Controller for Laravel 8
Previously, I was trying for a few hours to get my “destroy()” function working. Which would sound ridiculous to most of you but simply putting “method(“DELETE”)” in the form made it work, which I still don’t why. Now, I’m stuck with the update() function. Once I click update, the page just reloads and does nothing. It doesn’t update the info
How to change ‘users’ auth table and use another instead Laravel
So I just started a Laravel Project with Breeze, and I wanted to change the default table users , the problem is it didn’t work, I did my research for days and I didn’t get any successful result I will try to explain what is the problem and what have I tried so far. First, I created a new table
store function laravel 8 not saving data to the database
Thanks in advance for taking the time to read throw the question. so I have a form in a blade view where a user can add a name, a description, and upload an image but the data is not being passed to the database The blade view: store function in controller : The migration which I had used: and at
How to active and inactive boolean in Laravel
I want to know how to make a Boolean data true or false in database whenever my button is clicked. I already can perform a true when button is clicked, I want to know how to make it false. I hope I can get a answer thank you! BTW, this is my first time to post a question here and
Blank page issue for Laravel project in Subdomain
I am having a Blank Page issue for Laravel Project in a Sub-domain (cPanel). The root domain (https://ratul.info/) already has a Laravel application. So I was trying to upload another Laravel project in a Sub-domain (https://ecommerce.ratul.info/). Unfortunately, it was showing a White Screen with no error. Sub-domain details Subdomains: ecommerce.ratul.info Document Root: /public_html/ecommerce Files of public and index.php is in