Livewire component for creating shipping records with modal controls and validation. Reuse when building inventory shipping management forms.
// Source: https://github.com/Zakarialabib/myStockMaster | License: MIT | Copyright 2022 Zakarialabib
// Provided via justclaw.it.com; keep this notice with the code.
<?php
declare(strict_types=1);
namespace App\Livewire\Shipping;
use App\Models\Shipping;
use App\Traits\WithAlert;
use Illuminate\Support\Facades\Gate;
use Livewire\Attributes\On;
use Livewire\Attributes\Validate;
use Livewire\Component;
class Create extends Component
{
use WithAlert;
public bool $createModal = false;
public Shipping $shipping;
public bool $is_pickup = false;
#[Validate('required|max:255')]
public string $title;
#[Validate('nullable|max:255')]
public string $subtitle;
#[Validate('required|numeric')]
public mixed $cost;
public function render(): \Illuminat
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key