could not validate an array of input in laravel 8. from the frontside I have gotten the serialized form data which was successfully accessible from the backend. what I want is to validate the form inside the update function before I update the data when the user changes. what I have tried on the validation function is below looking recommendation
Tag: laravel-8
laravel – Can I add new items to an array that already has some existing items?
var_export($response) is an array like below: The below code gives a result like this: “data”: 3. I wanted add a new item called points with the $response array, into all elements. But here, it overwrites the existing array. How can I achieve this? Expected output: Answer As mentioned, array_push() returns the new number of elements in the array. That’s why
How to find out if there is anymore words after a full stop?
I have some text’s stored in the database and while I show them in the frontend I place the words before each full-stop within a li tag. Everything is working fine except when the text has a full-stop at the very end, it ends up showing an empty numbering. For example, if I have “aaaaaa.Something Something.” the output will be
How Can I Get False in Auth::attempts Laravel
I Have AuthController, with this code and i Hash with my Own Hash, and when i dump the $credentials, the value is correct. but when i dump Auth::attempt($credentials) i got false result. Answer Using your own hash function for authentication isn’t as straight forward as implementing a custom hash function and dropping it in place. The entire process is more
Setting ajax url in external js file in laravel 8
i have a single paged website developed in laravel 8 uploaded on a live server. The site has a contact form which uses ajax to send mail. Am currently having issues with setting the right ajax url. I have checked some solutions online but none have solved the problem. Below are my routes. On the blade header i have this:
Laravel Views Subfolders routing
I have sub folders inside my view folder called I want to route this saled.blade.php and datauploader.php files in web.php I have tried with in both the ways.but both shows 404 errors. and this is the way I mentioned the url of the file in home.blade.php So please help to resolve this Answer if directly form the web file :
Extended Request missing data when reaching controller with type-hint
A lot of pieces to this so here’s the meat. Code very slightly tweaked for brevity. Extended class: Middleware: Routes: Controller: The /books1/5?foo=bar and frontend1() path works. $request is populated as expected. The /books2/5?foo=bar and frontend2() path is broken. $request has vast amounts of missing data, like it was instantiated with nothing. Evidently if I type-hint my subclass instead of
Can’t do PHP Artisan Migrate with SQLSTATE [42000]
I just want to PHP Artisan Migrate, I’ve just completed my table on migration but have error I’ve checked my completion that there is no error or any miss spelling I’ve not added nullable because all column have to fill I’m using Laravel 8.6 and on Windows with XAMPP and MariaDB Answer The foreignId method creates an UNSIGNED BIGINT equivalent
laravel – unable to get data outside foreach
dump($data) outside the foreach loop gives me only 1 data where as dump($data) inside the foreach shows all arrays of rows of data . How can i get all rows of data outside the foreach too? EDIT: Error: Call to a member function paginate() on array Answer In Controller add new function for it After that crate that function for
I want to display the days and date also by the relationship between the coach and working times
Here a want to add Appointments available for the coach by using two tables…one for date_days the second for trainer and I make a 1-m relation between two tables. Dateday Table… Show this way you give me an error, And I want To add a day and date and start_date/end_date to the index page for trainer Who can do this??