Category : caching

I’ve deploy a laravel API some months ago into a shared hosting (banahosting). It’s been working fine until yesterday that all API endpoints returns an error: IlluminateDatabaseQueryException: SQLSTATE[HY000] [1045] Access denied for user ‘####’@’localhost’ (using password: YES) (SQL: select `destinations`.*, (select count(*) from `experiences` where `destinations`.`id` = `experiences`.`destination_id`) as `experiences_count` from `destinations` order by `id` ..

Read more

I’ve deploy a laravel API some months ago into a shared hosting (banahosting). It’s been working fine until yesterday that all API endpoints returns an error: IlluminateDatabaseQueryException: SQLSTATE[HY000] [1045] Access denied for user ‘####’@’localhost’ (using password: YES) (SQL: select `destinations`.*, (select count(*) from `experiences` where `destinations`.`id` = `experiences`.`destination_id`) as `experiences_count` from `destinations` order by `id` ..

Read more

thanks in advance. here is the situation, there are some images in the system, if a user is authorized to see the images, controller sends image file back to user using this header : ‘Content-Type’ => ‘image/jpeg’, otherwise, they’ll get a 404 response. as simple as that. once a user sees one of their images, ..

Read more

I would like to download files from a controller method with: public function ….(…){ ….. return response()->download(….); } But without cache, the function must re-validate the content and download a fresh download. I tried many different things like: return response()->header(‘Cache-Control’, ‘no-cache, must-revalidate’) return response()->download(..)->header(‘Cache-Control’, ‘no-cache, must-revalidate’) and none of that is working. The laravel responses ..

Read more