forked from eatvio/eatvio-infra
make static analyse part
This commit is contained in:
@@ -6,24 +6,25 @@ use App\Models\User;
|
||||
use App\Models\WeightMeasure;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use LivewireUI\Modal\ModalComponent;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class AddWeight extends ModalComponent
|
||||
{
|
||||
public User $user;
|
||||
|
||||
public $weight = 0;
|
||||
public int $weight = 0;
|
||||
|
||||
public function mount()
|
||||
public function mount(): void
|
||||
{
|
||||
$this->user = Auth::user();
|
||||
}
|
||||
|
||||
public function render()
|
||||
public function render(): View
|
||||
{
|
||||
return view('livewire.user.add-weight');
|
||||
}
|
||||
|
||||
public function add()
|
||||
public function add(): void
|
||||
{
|
||||
$newMeasure = WeightMeasure::create([
|
||||
'user_id' => $this->user->id,
|
||||
|
||||
Reference in New Issue
Block a user