⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.229
Server IP:
95.217.99.93
Server:
Linux sv1.sonichosted.com 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lifestylescentra
/
public_html
/
app
/
Services
/
View File Name :
ShippingMethodService.php
<?php namespace App\Services; use App\Models\ShippingMethod; class ShippingMethodService { protected $shippingMethod; public function __construct(ShippingMethod $shippingMethod) { $this->shippingMethod = $shippingMethod; } public function getAll() { return $this->shippingMethod->all(); } public function getActive() { return $this->shippingMethod->where('status', 1)->get(); } public function create($request) { $data = $request->except('_token'); $data['is_free'] = $request->fee == 0 ? 1 : 0; $shipping = $this->shippingMethod->create($data); return $shipping; } public function find($id) { return $this->shippingMethod->find($id); } public function update($request, $shipping) { $data = $request->except('_token'); $data['is_free'] = $request->fee == 0 ? 1 : 0; $shipping->update($data); return $shipping; } }