title: Grammar::parameterize(): Argument #1 ($values) must be of type array, string given, called
body: <p>This is my Controller named &quot;AttendanceController&quot;.</p>
  <pre><code>public function index()
  {
      $attendances = Attendance::orderBy('date', 'desc')-&gt;paginate(50);
      $students = Student::all();
      return view('attendances.index', compact('attendances', 'students'));
  }
  public function create()
  {
      $students = Student::all();
      return view('attendances.create', compact('students'));
  }
  public function store(Request $request)
  {
      $students = Student::all();
      $request-&gt;validate(array(
          'attendance' =&gt; 'required',
          'date' =&gt; 'required',
      ));
  
      $attendance = Attendance::create(array(
          'attendance' =&gt; $request-&gt;input('attendance'),
          'date' =&gt; $request-&gt;input('date'),
      ));
  
      return redirect()-&gt;route('attendances.index')-&gt;withSuccess('Done');
  }
  </code></pre>
  <p>This is my attendances.create where There is form to submit.</p>
  <pre><code>&lt;form method=&quot;post&quot; action=&quot;{{route('attendances.store')}}&quot;&gt;
          @csrf
          &lt;table&gt;
  
                  &lt;tr&gt;
                      &lt;th&gt;&lt;p style=&quot;margin: 20px&quot;&gt;Name : &lt;/p&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;p style=&quot;margin: 20px&quot;&gt;Attendance : &lt;/p&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;p style=&quot;margin: 20px&quot;&gt;Date : &lt;/p&gt;&lt;/th&gt;
                  &lt;/tr&gt;
              @foreach ($students as $student)
                  &lt;tr&gt;
                      &lt;th&gt;&lt;p style=&quot;margin: 20px&quot;&gt;{{ $student-&gt;name }}&lt;/p&gt;&lt;/th&gt;
                      &lt;input name=&quot;id[]&quot; type=&quot;hidden&quot; value=&quot;{{ $student-&gt;id }}&quot;&gt;
                      &lt;th&gt;&lt;p style=&quot;margin: 20px&quot;&gt;
                          &lt;select name=&quot;attendance[]&quot; id=&quot;attendance&quot;&gt;
                              &lt;option value=&quot;present&quot;&gt;present&lt;/option&gt;
                              &lt;option value=&quot;absent&quot;&gt;absent&lt;/option&gt;
                              &lt;option value=&quot;half_day&quot;&gt;half day&lt;/option&gt;
                          &lt;/select&gt;&lt;/p&gt;
                      &lt;/th&gt;
                      &lt;th&gt;&lt;p style=&quot;margin: 20px&quot;&gt;&lt;input type=&quot;date&quot; class=&quot;form-control&quot; name=&quot;date[]&quot;&gt;&lt;/p&gt;&lt;/th&gt;
                  &lt;/tr&gt;
  
              @endforeach
              &lt;td&gt;&lt;button class=&quot;btn btn-primary&quot; name=&quot;submit&quot; id=&quot;submit&quot;&gt;Submit&lt;/button&gt;&lt;/td&gt;
          &lt;/table&gt;
      &lt;/form&gt;
  </code></pre>