Revision 249 | Revision 257 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?phpnamespace App\Http\Controllers\online_shop;use App\Http\Controllers\Controller;use App\Models\Shipping;use App\Models\ShippingGroup;use Illuminate\Contracts\Foundation\Application;use Illuminate\Contracts\View\Factory;use Illuminate\Contracts\View\View;class ShippingController extends Controller{public function __construct(){$inselversand = array("keine Berücksichtigung","kein Inselversand","nur Inselversand",);\View::share( "inselversand", $inselversand );$shippingGroups = ShippingGroup::all();$versandgruppen = array();foreach( $shippingGroups as $shippingGroup ){$versandgruppen[$shippingGroup->id] = $shippingGroup->name;}\View::share( "versandgruppen", $versandgruppen );}public function index(): Factory|View|Application{$shipping = Shipping::with("shipping_group")->orderBy("rank")->get();return View( "online_shop.shippingList", [ "shipping" => $shipping ] );}}