You authorize a controller when you want to authorize more than one action.
(当您想授权多个动作时,就授权一个控制器。)
The authorizeResource covers multiple actions, while the form request is for the current request only. (authorizeResource涵盖多个操作,而表单请求仅针对当前请求。)
You could use form request authorization when you would like to authorize only the store and update actions for example, as for those more often a FormRequest is used.
(例如,当您只想对存储和更新操作进行授权时,可以使用表单请求授权,因为更经常使用FormRequest。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…