title: data type for character and numbers in laravel
body: <p>I want to store character and numbers for column have primary key in database. </p>
  
  <p>I created the table through query in laravel like this</p>
  
  <pre><code>  public function up()
      {
          Schema::create('students', function (Blueprint $table) {
              //   $table-&gt;increments('id');
              $table-&gt;engine = 'InnoDB';
  
              $table-&gt;string('roll_no');
              $table-&gt;string('name');
              $table-&gt;string('father_name');
              $table-&gt;string('address');
              $table-&gt;string('cnic')-&gt;unique();
              $table-&gt;string('phone_no');
              $table-&gt;string('father_phone_no');
              $table-&gt;string('email')-&gt;unique();
              $table-&gt;string('password');
              $table-&gt;string('dept_id');
              $table-&gt;rememberToken();
              $table-&gt;timestamps();
  
              $table-&gt;primary('roll_no');
              $table-&gt;foreign('dept_id')-&gt;references('dept_id')-&gt;on('departments')-&gt;onDelete('cascade');
          });
      }
  </code></pre>
  
  <p>and set my column datatype string. which shows varchar in database looking fine. When i enter values in form the data stored perfectly like <strong>12abc</strong> but when i fetch data from database it shows only <strong>12</strong> without characters. 
  And the function is </p>
  
  <pre><code>   public function showStudents()
      {
          $allStudents = Student::all();
  //        $user = Auth::user();
          return view ('admin.students.showStudents', compact('allStudents'));
      }
  </code></pre>
  
  <p>and loop is </p>
  
  <pre><code>  @foreach($allStudents as $student)
                                  &lt;tr&gt;
                                      &lt;th scope="row"&gt;{{ $student-&gt;roll_no }}&lt;/th&gt;
                                      &lt;td&gt;&lt;a href="{{ action('AdminController@singleStudent', [$student-&gt;roll_no])}}"&gt;{{ $student-&gt;name }}&lt;/a&gt;&lt;/td&gt;
                                      &lt;td&gt;{{ $student-&gt;address }}&lt;/td&gt;
                                      &lt;td&gt;{{ $student-&gt;phone_no }}&lt;/td&gt;
                                      &lt;td&gt;{{ $student-&gt;email }}&lt;/td&gt;
                                      &lt;td&gt;{{ $student-&gt;dept_id }}&lt;/td&gt;
                                      &lt;td&gt;&lt;a href="{{ action('AdminController@editStudents', [$student-&gt;roll_no])}}" class="edit"&gt;Edit&lt;/a&gt;  &lt;a href="{{ action('AdminController@deleteStudent', [$student-&gt;roll_no])}}" class="delete"&gt;Delete&lt;/a&gt; &lt;/td&gt;
                                  &lt;/tr&gt;
                              @endforeach``
  </code></pre>
  
  <p>What should i do to get proper and complete data. Thanks in advance.</p>