If I write this line on routes/web.php file It outputs this: That’s cool, but my question is since app()[‘config’] returns an object so how this [“auth.guards.web”]works? Even there is no index with that name! Outside of Laravel I tried to write a class named Test so that it retu…
Tag: laravel
Adding Data to Belongs to resource using TextField laravel Nova
Hi is there any way to insert data in two tables in one request laravel nova belongsTo relation What I am trying to achieve is that I have two models first is the user model & the second one is the student Model User model has email and password And student model has other profiling details of a student w…
Laravel UniSharp file manager is uploaded but images are not displayed
I am using UniSharp file manager package in Laravel. I have no problem uploading, But images are not displayed. After executing the php artisan storage:link command, only the storage folder is displayed and there are no uploaded files in it. .env APP_URL=http://localhost:8000 Laravel Framework 8.6.0 unisharp:…
Laravel localization in routes without prefix
I have a Laravel app in 9 difference languages: I’m trying to set up localized URL’s like: All content on the website is displayed in the correct language but routing returns 404 pages except for default fallback language. My web.php My locale middleware: Using the fallback language URLs in produc…
laravel array update multiple rows with diffrent ids
i am stuck in when i update multiple array value then each time update same value in diffrent ids like i have three fields like email,alert_level and select in select dropdoewn depends on alert_level …
IlluminateDatabaseQueryException: SQLSTATE[42S02]: Base table or view not found: 1146 Table  (truncated
I’ve created an API using Laravel v5.8. This API has one endpoint that recieve some parameters and create 1 row on a database table. When I call to this endpoint using Postman, it works. But… I’ve …
Laravel join tables with JSON field, when some fields have no foreign key
I want to join 2 tables by a foreign key stored in a JSON field. The field can be empty, so i get an error, i can not sem to get rid of. I have a model Transaction: the items field is json: now i want to join these tables for a query: The problem is, that i have many
How to use my own pre-existing table for authentication in laravel 8?
I installed auth in laravel 8 but I don’t want to use the default table dedicated for authentication Users because I have my table Users_inf in this case I can’t use migration, Users_inf also has 200 records. Users_inf(user_id, password, user_name,privilege,active,CREATED_AT,UPDATED_AT). CREATED_A…
Why is my field validated even if it’s not required?
I have a request that takes several input. I want the ‘salary’ input to be validated only if the salary_type is equal to “exact”. Else, I don’t want to have any message about it. However, …
php substr() and currency symbol strange output
This is a little bit rude code and I am having this output for this simple string formatting sample. $originalValue is equal for example to “$50.00”; $currency is setted correctly to “$”; $value should be “50.00” but this is the result of the above dd() is: b”£50.00&#…