mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 10:06:51 +01:00 
			
		
		
		
	* Remove old admin * Remove controller test * Remove unused exceptions * Remove unused files * More small tweaks * Fix doc block * Remove unused service * Restore these * Add back autoDeploy * Revert "Add back autoDeploy" This reverts commit 630c1e08acf8056ce8e612f376fcd00c23d90aea. * Add these back * Add back exception * Remove ApiController again --------- Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Co-authored-by: Boy132 <mail@boy132.de> Co-authored-by: notCharles <charles@pelican.dev>
		
			
				
	
	
		
			28 lines
		
	
	
		
			637 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			637 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Transformers\Api\Client;
 | 
						|
 | 
						|
use App\Models\Subuser;
 | 
						|
 | 
						|
class SubuserTransformer extends BaseClientTransformer
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Return the resource name for the JSONAPI output.
 | 
						|
     */
 | 
						|
    public function getResourceName(): string
 | 
						|
    {
 | 
						|
        return Subuser::RESOURCE_NAME;
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Transforms a subuser into a model that can be shown to a front-end user.
 | 
						|
     */
 | 
						|
    public function transform(Subuser $model): array
 | 
						|
    {
 | 
						|
        return array_merge(
 | 
						|
            $this->makeTransformer(UserTransformer::class)->transform($model->user),
 | 
						|
            ['permissions' => $model->permissions]
 | 
						|
        );
 | 
						|
    }
 | 
						|
}
 |