title: How to store some text typed in textarea as a text file in laravel?
body: <p>Hello friends I have a laravel project where I am trying to save some text typed in <strong><em>textarea</em></strong> input element as a text file. And I don't know how to do it. Here is my blade file code and controller code:</p>
  
  <p>Part of Blade file form code</p>
  
  <pre><code>&lt;form method="POST" action="/company" enctype="multipart/form-data"&gt;
    {!! csrf_field() !!}
    &lt;textarea name="description"&gt;
      Write something.
    &lt;/textarea&gt;
  
    &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Part of controller code</p>
  
  <pre><code>public function store(Request $request){
    $destinationPath='public/company_info';
    $fileName = 'description.txt';
  
  
    $request-&gt;description-&gt;storeAs(
      $destinationPath, $fileName
      );
  }
  </code></pre>