add bookingcontroller@report, still in testing

This commit is contained in:
Too
2018-06-28 20:52:47 +08:00
parent e36c2a52af
commit cabf43cfdc
3 changed files with 25 additions and 10 deletions
+10 -9
View File
@@ -11,6 +11,7 @@ use App\UserBankSlip;
use App\User;
use App\Invoice;
use App\SettingCredit;
use Anam\PhantomMagick\Converter;
use Auth;
use Validator;
use DateTime;
@@ -635,13 +636,13 @@ class BookingController extends Controller
return response()->json(['message'=>"Success"],200);
}
public function report(Request $request){
$conv = new \Anam\PhantomMagick\Converter();
$conv->source('http://google.com')
->toPng()
->save('/your/destination//google.png');
$conv->toPng();
}
public function report(Request $request, $id)
{
$conv = new Converter();
// $conv->setBinary('/vendor/anam/phantomjs-linux-x86-binary/bin/phantomjs');
$conv->addPage('<html><body><h1>Welcome to PhantomMagick</h1></body></html>')
->save('/storage/app/report/multipage.pdf');
}
}
}