Open sidebar
/** * @return self */ // Brand Service public function prepareDataRequest() : self { $data = request()->only("name","order","logo"); $logoPath = $this->uploadLogo($data["name"]); if(!is_null($logoPath) && (is_null($logoPath) && is_null($this->brand->logo))) { $data["logo"] = $logoPath; } $slug = $this->slugGenerate($data["name"],request()->slug); $data["slug"] = $slug; $data["status"] = request()->has("status"); $data["is_featured"] = request()->has("is_featured"); $this->prepareData = $data; // TODO: DATA IS EMPTY. return $this; } // getById public function getById(int $id) { return $this->brand::query()->find($id); }
Close sidebar
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting