title: Yii2 how can I use a like query for first character only
body: <p>How can I use a like query and limit to the first character only for example my code below works however it does it for all characters for example if an item was called end it would appear in e, n &amp; d rather than just e the starting character/letter.</p>
  
  <p>Current Query/Code</p>
  
  <pre><code>    public function actionAlphabet($id)
  {
      $this-&gt;layout = 'directory';
  
      $query = Directory::find()
      -&gt;where(['LIKE', 'name', $id]);
  
      $dataProvider = new ActiveDataProvider([
          'query' =&gt; $query
      ]);
  
      return $this-&gt;render('index', [
          'dataProvider' =&gt; $dataProvider,
      ]);
  } 
  </code></pre>