语法创建新模型时出错

时间:2015-07-12 23:05:12

标签: php laravel laravel-5

我收到以下错误:

FrontendController.php第69行中的FatalErrorException: 语法错误,意外'(',期待标识符(T_STRING)或变量(T_VARIABLE)或'{'或'$'

第69行是$ lewp = new Lewp(数组(

关于是什么创造了这个?

public function create_submit(LewpCreateFormRequest $request)
{
    $lewp = new Lewp(array(
        'name' => $request->('name'),
        'moderators' => '1',
        'title' => $request->('title'),
        'text' => $request->('text'),
        'sidebar' => $request->('sidebar'),
        'submission_text' => $request->('submission_text'),
        'type' => $request->('type'),
        'link_button_text' => $request->('link_button_text'),
        'text_button_Text' => $request->('text_button_text'),
        'comment_sort_method' => $request->('comment_sort_method'),
        'hide_comment_scores' => $request->('hide_comment_scores'),
        'header_mouseover_text' => $request->('header_mouseover_text')
    ));

    $lewp->save();

    return view('frontend.create')->with('message', 'Lewp Created');
}

0 个答案:

没有答案