title: Laravel 5 Call to undefined function App\Http\Controllers\riderect() Error
body: <p>I’m new to the laravel and I’m developing a file uploading system. The files are uploaded and stored to the database just fine, but when I try to call the delete method, it gives this error:</p>
  
  <blockquote>
    <p>Call to undefined function App\Http\Controllers\riderect()</p>
  </blockquote>
  
  <p>Here is the FileUpload Controller and its delete method:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Storage;
  use Illuminate\Support\Facades\Redirect;
  use App\UploadedFile;
  
  class FilesController extends Controller
  {
  public function deleteFile($id)
      {
          $file = UploadedFile::find($id);
          Storage::delete(config('app.fileDestinationPath').'/'.$file-&gt;filename);
          return riderect()-&gt;to('uploaded');
      }
  }
  </code></pre>
  
  <p>How can this error be avoided?</p>