I am getting Argument 1 passed to IlluminateDatabaseGrammar::parameterize() must be of the type array, string given this error when i use explode() to add in mysql database Here is my code Answer Here issue is you are trying to insert an array as string. To save this you have too do this as given below:
Tag: laravel
Proper Laravel way to get a relation basing on both tables
I do have 2 tables linked with each other. Items that has an ID and quantity column, as well as Attendees that have id, item_id and some other data. I would like to be able to see all the items that have: a) no attendees at all. b) less attendees than the quantity. c) as many attendees as the quantity.
cant set variable data inside the each loop
I want to set a data to a variable after a loop. But it still empty even I assign the variable inside the loop. My code: $hash = ”; $get_hash = Cart::session($user->id)->getContent()->each(…
Laravel redirect from index.php and index.html to domain
I am beginner webdeveloper. I have small problem with redirect. I have this htacess: It’s work fine. Now I need redirect from https://domain.pl/index.php and https://domain.pl.html to https://domain.pl I use Laravel 8. How can I make it? Answer The simplest way would be
Laravel query json column array
I am trying to access specific data in a json column using a laravel controller, the DB column is called ‘figuresinorder’. I want to access the “wants” key but it’s not working when there are multiple values stored. {“wants”: [“1”], “trades”: […
Laravel controller function times out, 50000 users
In my controller I have a have a function to check subscription status and update it in my database. The problem is with 50000 users, it takes too long to finish and times out. I’m sure I shouldn’t even process that many at a time but I kinda got stuck here and am not sure how exactly to approach …
laravel project on cpanel subdomain error: HTTP ERROR 500
I have a confusing error with laravel 7 project. This project when I uploaded it into the main directory It worked successfully. but when I uploaded it into a subdomain it gives me 500 error. I did steps that mentioned in this answer but it didn’t work also How to set up a laravel project on cPanel subd…
Why laravel landing page route return MethodNotAllowedHttpException?
I’m using laravel 7.x. since function(){return view(welcome);} will produce an error when I run php artisan route:cache, so I write this code below to replace function(): Route::get(‘/’, ‘…
style disappear when i add slash / after route
I’m using laravel 8 when I create a route for admin Route::group([‘prefix’ => ‘admin’], function () { Route::get(‘/’, function () { return view(‘layouts.adminlayout’); }); }); and …
Unable to submit a modal form using Ajax Request in Laravel
I am trying to delete a user based on user input in a modal form, but I am unable to do that. There is no error message in the console. Since I have started learning very recently, I am unable to identify where I am doing wrong. I am directly getting the error: part of the Ajax request. Here is