What I need: My app has a public domain All routes in my Admin controller should be opened only if the remote domain is domain1.com and also in local environment. Currently: if I put the admin panel route in the group, it is not visible in local environment any more, making it difficult to develop. Solutions My current solution: in
Tag: laravel-9
Laravel 9: Numeric value out of range: 1264 Out of range value for column ERROR
I’m working with Laravel 9 and I have used this column at users table for storing user mobile phone number: And at the factor, I tried this to fill out this column: But when I run php artisan db:seed, I get this error: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column ‘usr_mobile_phone’ at row 1
Laravel 9 Array Filter
I have this array cart_items and works fine when mapped for database storage as in the code. I need to filter the array using Arr:where(), where the product shop_id is a specific value. I tried using an if function but the code just looped returing true where the shop_id was present. I need to filter the array where the product
laravel relationship not loading
I’ve got a Product and a Category models: In my controller, I’m retrieveing all products and wanted to return the category object the product belongs to in the response, so I’m doing: and my resource looks like: but the response I’m getting is: I tried loading the relationship differently: but the result is the same. It seems that the relationship
IlluminateDatabaseGrammar::parameterize(): Argument #1 ($values) must be of type array, string given
I am trying to Seed a database using a Model Factory in Laravel but am seeing this error on the terminal. From the multiple solutions I have tried, it seems the issue is at the faker-generated content level, but I need that faker content for the factory to work as intended. Below are the Factory and Migration classes that will
Does Laravel 8 require PHP 8.1?
So.. I developed a project with Laravel 9, then I had to upload it to my client’s server by FTP ( which was slow and painful ) to find out only afterwards that my client’s server PHP version could not go over 8.0. I tried to open the project live link ( to where I uploaded ) and the composer
Laravel 9 – Seeder | TypeError array_merge(): Argument #2 must be of type array, int given
I have two tables named Order and OrderItem. While creating data in the Order table, I am trying to enter data into the OrderItem table at the same time. The codes are as follows; OrderSeeder.php OrderFactory.php OrderItemFactory.php Answer When I updated the page like this, the problem was solved. OrderSeeder.php You can use it as a resource when you encounter
Laravel Migration Error: SQLSTATE[42000]: Syntax error or access violation: 1091 with mysql
I am learning migration in Laravel. I have created a migration file and migrations seems to work fine from command line. But inside my mysql file the username column is not created after migration. Migration file: users table in mysql database: No username column created And when refresh my migration it gives me the below error Option1 : I tried
Deploy error with Laravel project on Shared Hosting (Uncaught RuntimeException: A facade root has not been set)
I’m deploying a laravel project into production enviroment on a shared host using FTP following this tutorial except the creation of the symbolic link beacuse I’m not using the local storage but ran into “Uncaught RuntimeException: A facade root has not been set” error. Aditional info: I tried with a new laravel project with the command composer create-project laravel/laravel project_name
Create view in one controller and store data in other controller laravel
I’m new to Laravel and I’m trying to store a form. I created the view with the House controller but now I want to store the data in the view with the Booking controller. But when I click the button nothing happens. My question is if it is possible to make a view with one controller and store it with