<?php
public function getPortfolio($catergory = null) {
if(is_null($catergory )) {
// default portfolio
$portfolio = Portfolio:all();
} else {
// many portfolio
$portfolio = Portfolio::where("catergory", $catergory )->get();
}
return view("portfolio", compact('portfolio'));
}
?>