22 lines
448 B
PHP
22 lines
448 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Posts;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ShareArtworkRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return (bool) $this->user();
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'body' => ['nullable', 'string', 'max:2000'],
|
|
'visibility' => ['required', 'string', 'in:public,followers,private'],
|
|
];
|
|
}
|
|
}
|