Hi guys,
I have a strange problem. Due to new packages installation, I had to do a "composer update" on my Laravel 5.0.5 app. I followed the official documentation and I did the unique mentioned change (http://laravel.com/docs/5.0/upgrade#upgrade-5.0.16). Now my custom middleware doesn't work. This is the code:
<?php namespace Presenze\Http\Middleware;
use Closure;
use Presenze\Company;
class LayoutData {
protected $company;
public function __construct(Company $company)
{
$this->company = $company;
}
public function handle($request, Closure $next)
{
$response = $next($request);
if (gettype($response) === "object")
{
return $response->with('userCompanies', $this->company->getUserCompanies());
}
return $response;
}
}
before the update the middleware was working fine. Now it doesn't alter the response object adding the $userCompanies object.
Any idea?
I found something. Now the with() method doesn't work with $response object... why?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community