Trying to connect laravel 8 app in production to mysql database. Have tried to follow documentation but it isn’t working. .env file as follows DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 …
Tag: laravel
Object of class IlluminateDatabaseEloquentBuilder could not be converted to string laravel 7
I have been trying to debug a problem for the past two days, my code, as follows, is first attempting to retrieve the category by its: Controller public function index(Request $request) { $stats = …
PHP S3 – How to get all versions of a specific file
I have a Laravel project and a version enabled S3 bucket. I can list the versions of all objects within the bucket using the listObjectVersions method. My attempt to list the versions of a specific object is as follows: This seems to get all objects within the bucket which is not what I want. Is there a way to get
Laravel 6 query related to searching events not showing result when some fields are empty and some not
i’m kind of new to laravel first time developing on it. My goal is to get some filtered events to show, the filters should all work together (‘filter 1’ AND ‘filter2’ ecc..) even when some are empty. The problem that i’m getting is that when my filter fields are empty the query won’t return any event. My CONTROLLER code: More
What is the cause of this route-related error in my Laravel 8 application?
I am working on a Laravel application that requires user registration and login. Alter registration, the users have the possibility to replace the default avatar image with a picture of their choice. They should also be able to delete this picture and revert to the default avatar (default.png). For this purpose I did the following: In routes/web.php I have the
how to limiting word on the laravel blade?
I’m looking to find out how to limit word in laravel blade. I’ve coded using substr, but it’s still not working properly. Can anyone help me? Answer The Str::words method limits the number of words in a string. An additional string may be passed to this method via its third argument to specify which string should be appended to the
antonioribeiro/countries How to get currency symbol directly from country selection?
I am not sure if this is a correct channel for the package question, But I am using this package, https://github.com/antonioribeiro/countries. Documentation is not much clear. I can get currency symbol with the below code, But in the second line of code, I must specify INR to get the symbol. But as per requirements, I must get a symbol by
How to call specific data from column database in Laravel 8
I want to call specific value from field column in my database.. Let say i have table called posts, my table have field called post_meta_title and have value home How do i call only that value to show in my meta tags.. I have tried it, and it show error Property [post_meta_title] does not exist on this collection instance Does
How to calculate balance in payment and invoice page in laravel?
I have this page showing invoice and payments, I want to calculate balance at end each row of the table. I have my records sorted on DESC order that’s why I am unable to get it right. The result is in below picture, It is sorted by created at, I want that the type Payment is deducted from the balance
Laravel 5.8: Can you help me with this problem
I’m using Laravel 5.8 to develop my Online Store. And in this store, every product has a field of prd_delivery and it can be set one of these values: city_free_delivery country_free_delivery null When it is null, it means that it does not have any free delivery type. And when users select their products, these situations must be applied: Note that