You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
449 B
19 lines
449 B
<?php
|
|
|
|
namespace App\Utilities\Middlewares;
|
|
|
|
use Closure;
|
|
use App\Models\Business;
|
|
|
|
class BindBusinessInfo
|
|
{
|
|
|
|
public function handle($request, Closure $next, $guard = null)
|
|
{
|
|
$business_id = $request->has('business_id') ? $request->business_id : $request->route('business');
|
|
$businessInfo = Business::info($business_id);
|
|
$request->merge(['_business_info' => $businessInfo]);
|
|
|
|
return $next($request);
|
|
}
|
|
}
|