我想在我的barryvdh創作的項目中使用Lavarel 4.2.0的dompdf包,我試着安裝這個包的三個不同版本(0.6 *,0.6.1 ,0.5.2)類dompdf.wrapper不存在laravel 4.2.0
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
"fzaninotto/faker": "^1.6",
"barryvdh/laravel-dompdf": "0.5.2"
如何以往每次我試圖創建一個使用
Route::get('/invoice', function()
{
$pdf = App::make('dompdf.wrapper');
$pdf->loadHTML('<h1>Test</h1>');
return $pdf->stream();
});
我得到這個錯誤PDF文件
Class dompdf.wrapper does not exist (vendor\laravel\framework\src\Illuminate\Container\Container.php)
/hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
if ($concrete instanceof Closure)
{
return $concrete($this, $parameters);
}
$reflector = new ReflectionClass($concrete);
// If the type is not instantiable, the developer is attempting to resolve