Return Value View to Controller

Hello, I am new in yii, How can I return value to view to controller, I am currently using

laravel 5.1, In laravel you can access view to controller by using routes, I am confuse how to use it in yii, in attachment I want when clicking X button the current attachment remove.

It is similar. Create an action in a controller, optionally add a route for it (there are defaults in Yii in form of controller/action), make an AJAX POST request to controller/action. That’s it.

can you show me some sample, for refresh only. Thanks in advance :)

Please elaborate what is "refresh only" then.