Install mpdf or dompdf issue on laravel 5.2

I am trying to add dompdf on my laravel project using command-

composer require barryvdh/laravel-dompdf: 0.7.0

after installation i get error:

> [2022-01-29 17:45:54] local.ERROR: UnexpectedValueException: The > Response content must be a string or object implementing __toString(), > “boolean” given. in > D:xampphtdocsmykidreportvendorsymfonyhttp-foundationResponse.php:399 > Stack trace: > #0 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateHttpResponse.php(56): > SymfonyComponentHttpFoundationResponse->setContent(false) > #1 D:xampphtdocsmykidreportvendorsymfonyhttp-foundationResponse.php(201): > IlluminateHttpResponse->setContent(false) > #2 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingRouter.php(1085): > SymfonyComponentHttpFoundationResponse->__construct(false) > #3 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingControllerDispatcher.php(94): > IlluminateRoutingRouter->prepareResponse(Object(IlluminateHttpRequest), > false) > #4 [internal function]: IlluminateRoutingControllerDispatcher->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #5 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(52): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #6 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #7 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(102): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #8 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingControllerDispatcher.php(96): > IlluminatePipelinePipeline->then(Object(Closure)) > #9 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingControllerDispatcher.php(54): > IlluminateRoutingControllerDispatcher->callWithinStack(Object(AppHttpControllersDashboardController), > Object(IlluminateRoutingRoute), Object(IlluminateHttpRequest), > ‘index’) > #10 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingRoute.php(174): > IlluminateRoutingControllerDispatcher->dispatch(Object(IlluminateRoutingRoute), > Object(IlluminateHttpRequest), ‘AppHttpContro…’, ‘index’) > #11 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingRoute.php(140): > IlluminateRoutingRoute->runController(Object(IlluminateHttpRequest)) > #12 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingRouter.php(724): > IlluminateRoutingRoute->run(Object(IlluminateHttpRequest)) > #13 [internal function]: IlluminateRoutingRouter->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #14 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(52): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #15 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateViewMiddlewareShareErrorsFromSession.php(49): > IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #16 [internal function]: IlluminateViewMiddlewareShareErrorsFromSession->handle(Object(IlluminateHttpRequest), > Object(Closure)) > #17 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(136): > call_user_func_array(Array, Array) > #18 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest)) > #19 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(32): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #20 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateSessionMiddlewareStartSession.php(64): > IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #21 [internal function]: IlluminateSessionMiddlewareStartSession->handle(Object(IlluminateHttpRequest), > Object(Closure)) > #22 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(136): > call_user_func_array(Array, Array) > #23 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest)) > #24 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(32): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #25 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateCookieMiddlewareAddQueuedCookiesToResponse.php(37): > IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #26 [internal function]: IlluminateCookieMiddlewareAddQueuedCookiesToResponse->handle(Object(IlluminateHttpRequest), > Object(Closure)) > #27 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(136): > call_user_func_array(Array, Array) > #28 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest)) > #29 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(32): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #30 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateCookieMiddlewareEncryptCookies.php(59): > IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #31 [internal function]: IlluminateCookieMiddlewareEncryptCookies->handle(Object(IlluminateHttpRequest), > Object(Closure)) > #32 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(136): > call_user_func_array(Array, Array) > #33 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest)) > #34 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(32): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #35 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #36 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(102): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #37 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingRouter.php(726): > IlluminatePipelinePipeline->then(Object(Closure)) > #38 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingRouter.php(699): > IlluminateRoutingRouter->runRouteWithinStack(Object(IlluminateRoutingRoute), > Object(IlluminateHttpRequest)) > #39 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingRouter.php(675): > IlluminateRoutingRouter->dispatchToRoute(Object(IlluminateHttpRequest)) > #40 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateFoundationHttpKernel.php(246): > IlluminateRoutingRouter->dispatch(Object(IlluminateHttpRequest)) > #41 [internal function]: IlluminateFoundationHttpKernel->IlluminateFoundationHttp{closure}(Object(IlluminateHttpRequest)) > #42 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(52): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #43 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateFoundationHttpMiddlewareCheckForMaintenanceMode.php(44): > IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #44 [internal function]: IlluminateFoundationHttpMiddlewareCheckForMaintenanceMode->handle(Object(IlluminateHttpRequest), > Object(Closure)) > #45 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(136): > call_user_func_array(Array, Array) > #46 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest)) > #47 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(32): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #48 D:xampphtdocsmykidreportvendordingoapisrcHttpMiddlewareRequest.php(111): > IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #49 [internal function]: DingoApiHttpMiddlewareRequest->handle(Object(IlluminateHttpRequest), > Object(Closure)) > #50 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(136): > call_user_func_array(Array, Array) > #51 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest)) > #52 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateRoutingPipeline.php(32): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #53 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest)) > #54 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminatePipelinePipeline.php(102): > call_user_func(Object(Closure), Object(IlluminateHttpRequest)) > #55 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateFoundationHttpKernel.php(132): > IlluminatePipelinePipeline->then(Object(Closure)) > #56 D:xampphtdocsmykidreportvendorlaravelframeworksrcIlluminateFoundationHttpKernel.php(99): > IlluminateFoundationHttpKernel->sendRequestThroughRouter(Object(IlluminateHttpRequest)) > #57 D:xampphtdocsmykidreportpublicindex.php(53): IlluminateFoundationHttpKernel->handle(Object(IlluminateHttpRequest)) > #58 {main}

and my composer.json file looks like this

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"tymon/jwt-auth": "0.5.*",
"dingo/api": "[email protected]",
"laravel/socialite": "^2.0",
"webpatser/laravel-uuid": "2.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r "copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\Foundation\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\Foundation\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}

from Newest questions tagged laravel-5 – Stack Overflow https://ift.tt/38IWgL0
via IFTTT

Related Posts

Codeigniter : Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE) in Laravel project

I’m getting following error: **Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE)** Note : It’s working in local but facing issue in production server. private…

Firebase receive notification while tab is active or on focus

What i want is to be able to perform an action when a user receives a notification while the browser is open and tab is active or…

Laravel’s alias loader does not find class

We have a legacy project that we cannot update and we need to make some changes in symfony’s Response.php in vendor. We have solved this by copying…

Laravel 5 – generic document management

I have a system where you can create different types of unique documents. For instance, one document is called Project Identified and this expects certain inputs. Originally,…

Laravel Nova limit the results in indexQuery

I ran intro a situation where I need to limit the results of a resource to only 3 results. To be more specific, based on the logged…

Auditoria en laravel 5.8 [closed]

Cómo puedo automatizar el registro de actividades de un usuario en laravel? Si un usuario ingresa a un app de laravel, debo guardar toda su actividas, a…

Leave a Reply

Your email address will not be published.