1
我正在開始使用Laravel。我有一個顯示和插入數據的控制器。它類似於Laravel控制器 - 模板。壓制主模板
class UserController extends BaseController {
protected $layout = 'layouts.master';
public function showProfile()
{
$this->layout->content = View::make('user.profile');
}
public function addProfile()
{
<Insertion Logic>
echo "Successfully added";
}
}
現在插入是ajax調用。所以我想在添加到數據庫後顯示正確的成功消息。但在我的情況下,佈局內容也出現了。我怎麼才能返回回聲消息。
謝謝
好..大聲笑..爲什麼我沒有想到..:P謝謝。 – Fox