PHP code example of mymediamagnet / laravel-snappy
1. Go to this page and download the library: Download mymediamagnet/laravel-snappy library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace Tests\Feature;
use Tests\TestCase;
use PDF;
class ExampleTest extends TestCase
{
public function testPrintOrderShipping()
{
PDF::fake();
// Perform order shipping...
PDF::assertViewIs('view-pdf-order-shipping');
PDF::assertSee('Name');
}
}