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

Revision

Revision 280 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

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