mariiamozgunova liked a comment+100 XP
1mo ago
hello , i installed laravel reverb with my application after the installation is done it show me websocket connection failed in the console
i did not change anything all the settings is by default am using docker with laravel sail keep in mind i run sail artisan reverb start and nothing work with me
if someone have any idea please help me
mariiamozgunova liked a comment+100 XP
1mo ago
@youcefkacem Oh my god. Thank you so much! Spent hours trying to find a solution to this problem.
mariiamozgunova liked a comment+100 XP
1mo ago
i fixed the issue by adding the following configuration in docker-compose.yml file
- '${REVERB_SERVER_PORT:-8080}:8080'
make sure to add that in the docker compose file to use the port
now everything is fine
mariiamozgunova liked a comment+100 XP
4mos ago
Cannot show image on header browsershot library
use VerumConsilium\Browsershot\Facades\PDF;
Route::get('/test', function () {
$bodyHtml = View::make('test.snap', compact('data'))->render();
$headerHtml = View::make('test._header')->render();;
$footerHtml = '<br><br>
<h1 style="font-size: 10px;color: #999; margin: 15px 40px; clear:both; position: relative; top: 20px;">
Page <span class="pageNumber"></span> of <span class="totalPages"></span>
</h1>';
/**
* Browsershot
*/
return PDF::loadHtml($bodyHtml)
->showBackground()
->showBrowserHeaderAndFooter()
->headerHtml($headerHtml)
->footerHtml($footerHtml)
->margins(30, 10, 30, 10)
->format('A4')
->inline();
});
_header.blade.php
<div style="font-size:14px;">Header </div>
<img src="https://onlinejpgtools.com/images/examples-onlinejpgtools/smile.jpg" alt="test" srcset="test">
<img src="{{ public_path('/images/phpt-logo.jpg') }}" alt="test">
mariiamozgunova liked a comment+100 XP
5mos ago
Well, after I fixed this, of course the next error happend with this bloody amazon API and the error messages where truncated again.
After debugging for a while I finally found a way how to get the whole XML error message from the API:
} catch (\GuzzleHttp\Exception\ClientException $e) {
ddd($e->getResponse()->getBody()->getContents());
}
The trick was to get the Response Object first, then via the getContents method you can access the stream with the whole XML in it.
Heureka!