Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Catch All For An Add/create Action

$
0
0
Hello all.

Anyone know how i can do a catch all that sees the 'add' action and forward to an action to do an add with $itemdata based on the controllerX?

/controller1/add/$itemdata
/controller2/add/$itemdata
/controller3/add/$itemdata

I want to send variable $controller (table) and $itemdata to do an insert into db table.

I have 40 tables and they willl all have similar inserts/updates based on the $itemdata but i do not want to copy/paste 40 functions for add/create.

Thanks

Regards,
Dennis

Viewing all articles
Browse latest Browse all 18717

Trending Articles