Prueba importando Concerns
use Caffeinated\Shinobi\Concerns\HasRolesAndPermissions;
en kernel si lo usas asi
'permission'=>\Caffeinated\Shinobi\Middleware\UserHasRole::class,
https://caffeinatedpackages.com/guide/packages/shinobi.html#usage
Creo q el nuevo problema es en el registro de permission en el kernel.
'permission' => \Caffeinated\Shinobi\Middleware\UserHasPermission::class,
Para la validacion de permisos en rutas en la nueva version de shinobi no existe el archivo UserHasPermission... el modo rapido que encontre de solucionarlo es crear el archivo UserHasPermission.php en la carpeta \Caffeinated\Shinobi\Middleware\
<?php
namespace Caffeinated\Shinobi\Middleware;
use Caffeinated\Shinobi\Models\Role;
use Closure;
use Illuminate\Contracts\Auth\Guard;
class UserHasPermission
{
/**
* @var Illuminate\Contracts\Auth\Guard
*/
protected $auth;
/**
* Create a new UserHasPermission instance.
*
* @param Guard $auth
*/
public function __construct(Guard $auth)
{
$this->auth = $auth;
}
/**
* Run the request filter.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $closure
* @param array|string $permissions
*
* @return mixed
*/
public function handle($request, Closure $next, $permissions)
{
if ($this->auth->check()) {
if (!$this->auth->user()->can($permissions)) {
if ($request->ajax()) {
return response('Unauthorized.', 403);
}
abort(403, 'Unauthorized action.');
}
} else {
$guest = Role::whereSlug('guest')->first();
if ($guest) {
if (!$guest->can($permissions)) {
if ($request->ajax()) {
return response('Unauthorized.', 403);
}
abort(403, 'Unauthorized action.');
}
}
}
return $next($request);
}
}