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

Revision

Revision 275 | Revision 294 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
224 lars 1
<?php
2
 
3
namespace App\Http\Requests;
4
 
5
use Illuminate\Foundation\Http\FormRequest;
6
 
7
class StoreSupplierShippingRequest extends FormRequest
8
{
9
    /**
10
     * Determine if the user is authorized to make this request.
11
     *
12
     * @return bool
13
     */
267 lars 14
    public function authorize(): bool
224 lars 15
    {
279 lars 16
        if ( isset( $GLOBALS["user_rechte"]["online_shop"]["porto_neu"] ) )
267 lars 17
        {
18
            return true;
19
        }
224 lars 20
        return false;
21
    }
22
 
23
    /**
24
     * Get the validation rules that apply to the request.
25
     *
26
     * @return array<string, mixed>
27
     */
267 lars 28
    public function rules(): array
224 lars 29
    {
30
        return [
31
            //
275 lars 32
            "name" => "required|max:255",
33
            "rank" => "int|min:0|max:999",
34
            "price"=>"decimal:0,2",
35
 
224 lars 36
        ];
37
    }
38
}