Spatie permission package is only working on back-end and not related to front-end. So you need to pass that information yourself.
That's how I do it, image we have a post API resource
return [
'id' => '...',
'title' => '...',
'content' => '...',
'can' => [
'edit' => auth()->user()->can('edit posts'),
'delete' => auth()->user()->can('delete posts')
]
];
That's an example of Laracasts response
