mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 15:36:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			580 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			580 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Http\Requests\Admin;
 | 
						|
 | 
						|
use App\Models\User;
 | 
						|
use Illuminate\Support\Collection;
 | 
						|
 | 
						|
class NewUserFormRequest extends AdminFormRequest
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Rules to apply to requests for updating or creating a user
 | 
						|
     * in the Admin CP.
 | 
						|
     */
 | 
						|
    public function rules(): array
 | 
						|
    {
 | 
						|
        return Collection::make(
 | 
						|
            User::getRules()
 | 
						|
        )->only([
 | 
						|
            'email',
 | 
						|
            'username',
 | 
						|
            'name_first',
 | 
						|
            'name_last',
 | 
						|
            'password',
 | 
						|
            'language',
 | 
						|
            'root_admin',
 | 
						|
        ])->toArray();
 | 
						|
    }
 | 
						|
}
 |