There are two completely different problems here.
- Accepting arguments in Catalyst
- Performing a search in DBIC
So, starting with the first one. Reading a query string.
$c->request->query_parameters->{field}
Then performing a search. Just call search
instead of all
and pass a hashref of your columns and values.
$c->model('DB::ptm')->search( { 'name' => $tag } );