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

Revision

Revision 234 | Revision 250 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
<?php
2
 
176 lars 3
    namespace App\Http\Controllers\online_shop;
2 lars 4
 
234 lars 5
    use App\Http\Controllers\Controller;
2 lars 6
    use App\Models\Shipping;
7
    use Illuminate\Contracts\Foundation\Application;
8
    use Illuminate\Contracts\View\Factory;
9
    use Illuminate\Contracts\View\View;
10
 
11
    class ShippingController extends Controller
12
    {
13
 
249 lars 14
        public function __construct()
15
	{
16
            $inselversand = array(
17
                "keine Berücksichtigung",
18
                "kein Inselversand",
19
                "nur Inselversand",
20
	    );
21
            \View::share( "inselversand", $inselversand );
22
            $shippingGroups = ShippingGroup::all();
23
            $versandgruppen = array();
24
            foreach( $shippingGroups as $shippingGroup )
25
            {
26
                $versandgruppen[$shippingGroup->id] = $shippingGroup->name;
27
            }
28
            \View::share( "versandgruppen", $versandgruppen );
29
	}
2 lars 30
        public function index(): Factory|View|Application
31
        {
32
            $shipping = Shipping::with("shipping_group")->orderBy("rank")->get();
234 lars 33
            return View( "online_shop.shippingList", [ "shipping" => $shipping ] );
2 lars 34
        }
35
 
36
    }