Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 153 | Revision 158 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

<?php

    namespace App\Http\Requests;

    use Illuminate\Foundation\Http\FormRequest;

    class StoreSupplierRequest extends FormRequest
    {
        /**
         * Determine if the user is authorized to make this request.
         *
         * @return bool
         */
        public function authorize(): bool
        {
            if ( isset( $GLOBALS["user_rechte"]["bestellwesen"]["lieferanten"] ) )
            {
                return true;
            }
            return false;
        }

        /**
         * Get the validation rules that apply to the request.
         *
         * @return array<string, mixed>
         */
        public function rules(): array
        {
            return [
                //
                "name"  => "required",
                "name2" => "sometimes",
            ];
        }
    }