1public $search = ''; 2public $isActive = true; 3 4public function resetFilters() 5{ 6 $this->reset('search'); 7 // Will only reset the search property. 8 9 $this->reset(['search', 'isActive']); 10 // Will reset both the search AND the isActive property. 11 12 $this->resetExcept('search'); 13 // Will only reset the isActive property (any property but the search property). 14}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter