Yatendra
Export excel for custom model
<?php
namespace App\Policies;
use App\Models\UsersAdmin;
use Filament\Actions\Exports\Models\Export;
class ExportPolicy
{
public function view(UsersAdmin $user, Export $export): bool
{
dd('sssssssssssssss');
return $export->user()->is($user);
}
}
15 replies
Export excel for custom model
and app service provider
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
// protected $policies = [
// Export::class => ExportPolicy::class,
// ];
public function register(): void { $this->app->bind(Authenticatable::class, UsersAdmin::class); }
public function register(): void { $this->app->bind(Authenticatable::class, UsersAdmin::class); }
15 replies