I want to use Intervention Image library for my Laravel project, so I just installed it via Composer and added this line of code to config/app.php: And also this line was added to aliases part: Now at my Controller I coded this: But as soon as I fill my form to check if it’s work or not, this error mess…
Tag: laravel
v-for vueJS condition v-if
I have a problem with v-for with v-if en my component VUEJS I need that if i have one promotion active show it in my div but if i haven´t got any promotion active show button for buy a promotion. I have do all my condition, but always show that i don´t have promotion active, but in console, no, in
Pagination showing 4 ways instead of only 1 (default one)
I’m working on a Laravel project and when I used pagination with links() method, it showed in the page 3-4 methods of pagination (all of them are working good), but I want to show only one of them. I haven’t modified anything like CSS or JS, but I don’t know how to get only one out of 4 of t…
Laravel Migration: “ERROR Class not found”
I’m new to Laravel, I’m building a small project with five tables: users, products, category, transactions, and a pivot table category_product. When I try to run the command Php artisan migrate I receive an error class “Transaction” not found here are the tables. User Table Reset Passw…
Laravel Storage rename file before downlaod
I want to rename a file in the moment before download it in Laravel 8.0: I currently using the following code: But I can’t find a way to rename it before download it. I don’t want to rename the file in S3. Answer You can pass second argument to download method as below
Add a reference back to original column?
I have a Categories -> Products -> and Review Table. My question is whether it’d be optimal to create a reference from the Review Table and the Category it belongs to, or should I just use the …
Attach images to product variants when creating a new product Laravel
i’m having difficulty attaching images to variants when creating new products. for example a product A with when I save this to the database, img1, img2, img3, img4 goes to both variant A1 and A2 instead of each variant to have its own images. How do I solve this? here is my controller Blade file Answer…
How to delete files automatically after one month?
I’m using S3 as a storage for my files and I have some files I need to delete them after like one month! I know I have to use laravel scheduler but these files that I need to delete is not store in database to just delete them! So is there any to delete the files in the bucket based
AWS S3 Bucket make specific folder and all files in it public
I have a function in my laravel that uploads and image in my s3 bucket: The problem is that, the newly uploaded image cannot be accessed. Now, I have a folder named public in my S3 bucket what I wanted is that by default, public folder and all of the images in it(old and newly uploaded) can be accessed public…
Why Laravel does not return an item from a collection
I have nested todos. Every todo hasMany todo. I try to get all todos on the same level with staudenmeir/laravel-adjacency-list I have a collection of todos. return $allTodos[0][0]; shows the following result: return $allTodos[0][0]->id; shows 30000000 as expected. Till here everything works well. But if I …