Dasun Dasun - 1 year ago 81
PHP Question

Laravel 5 Call to undefined function App\Http\Controllers\riderect() Error


m new to the laravel and i
m developing file uploading system. up-to file upload to the database is OK. but when i try to delete it gives this error.

Call to undefined function App\Http\Controllers\riderect()

here is the FileUpload Controller.and its delete function


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);
return riderect()->to('uploaded');

can anyone suggest me to solve this error?
Thank you.

Answer Source

It is a spelling error, this:

return riderect()->to('uploaded');

Should be:

return redirect()->to('uploaded');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download