<?php

namespace Daylight\Core\Modules\MenuBuilder\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreMenuRequest extends FormRequest
{
    public function authorize(): bool
    {
        return auth()->check() && auth()->user()->can('create:menus');
    }

    public function rules(): array
    {
        return [
            'name' => ['required', 'string'],
        ];
    }
}
