<?php Gate::policy(Post::class, PostPolicy::class);
Route::get('/with-authorization/{post}/livewire-dusk/{component}', function (Post $post, $component) {
$class = urldecode($component);
return app()->call(new $class);
})->middleware(['web', 'auth', 'can:update,post']);