0

I am getting the following error:

FatalErrorException in FrontendController.php line 69: syntax error, unexpected '(', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'

Line 69 is $lewp = new Lewp(array(

Any idea on what creates this?

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');
}
Joe
  • 655
  • 1
  • 11
  • 24
  • what is *LewpCreateFormRequest* suppose to be in the function arguments ? –  Jul 12 '15 at 23:10
  • `'name' => $request->('name'),`? ` 'name' => $request->name,` perhaps? – Mark Baker Jul 12 '15 at 23:13
  • @MarkBaker That fixed it. I went back and checked the tutorial (which is from December) and it has the other format on it as well. Did they change the format? – Joe Jul 12 '15 at 23:18
  • The "other format" is clearly a mistake.... it would work with curly `{}` brackets but not with `()` – Mark Baker Jul 12 '15 at 23:19
  • There might be a semicolon or bracket missing a line before your pasted line. It seems fine to me, every string is allowed as array index. – Jigs Virani Jul 13 '15 at 10:14

0 Answers0