public function updateSlugs()
    {
        $allRecords = $this->all();

        if ($allRecords) {
            foreach($allRecords as $record) {
                $activeRecord = $this->find($record->id);
                $activeRecord->update([
                    $this->getSlugColumn() => $this->buildSlug()
                ]);
            }
        }
    }
public function updateSlugs()
    {
        $allRecords = $this->all();

        if ($allRecords) {
            foreach($allRecords as $record) {
                $activeRecord = $this->find($record->id);
                $activeRecord->update([
                    $this->getSlugColumn() => $this->buildSlug()
                ]);
            }
        }
    }
public function updateSlugs ( ) { $ allRecords = $ this -> all ( ) ; if ( $ allRecords ) { foreach ( $ allRecords as $ record ) { $ activeRecord = $ this -> find ( $ record -> id ) ; $ activeRecord -> update ( [ $ this -> getSlugColumn ( ) => $ this -> buildSlug ( ) ] ) ; } } }
Update all slugs
Update all slugs