【发布时间】:2013-06-01 19:09:04
【问题描述】:
我在 laravel 4 中的 link_to_action 有问题
在 laravel 3 中,我会显示类似的链接
{{ HTML::link_to_action('user/create', 'Create User') }}
但是由于我已经切换到 laravel 4,所以我正在创建像这个 UserController 这样的控制器,但是当我尝试使用 HTML 时
{{ HTML::linkAction('user/create', 'Create User') }}
它给了我一个错误,即使有一个名为 create 的方法,操作也不存在。 任何帮助将不胜感激。
这是我的控制器
<?php
class UserController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store()
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param int $id
* @return Response
*/
public function update($id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
//
}
}
【问题讨论】: