morphTo(); } public function getFullPathForFastReactAttribute(){ $path = Storage::disk('public')->url($this->path); $path = str_replace('public/', '', $path); return $path; } // public function getBeforeAttribute(){ // $path = Storage::disk('public')->url($this->path); // $pos = strpos($path, 'before'); // if ($pos === false) { // return 0;///// 0 before // } else { // return 1;////// 1 after // } // } // public function getAfterAttribute(){ // $path = Storage::disk('public')->url($this->path); // $pos = strpos($path, 'after'); // if ($pos === false) { // return 0;///// 0 before // } else { // return 1;////// 1 after // } // } }