Hello I need help. I have two pages one upload and the second is fileupload. The upload file displays the data of files from the database and the fileupload contains upload form. Whenever I insert route on form action, i get the error Symfony\Component\Routing\Exception\RouteNotFoundException Route [/save-file] not defined. Please I need your help. Here are my codes: Upload.blade.php
@extends('layouts.studentlayout')
@section('title')
Project Dashboard
@endsection
@section('content')
<!-- add the box modal -->
<!-- Button trigger modal -->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h4 class="card-title"> Add Project Title
<a href="{{ route('/fileupload') }}" class="btn btn-success">Add</a>
</h4>
<!--this code will dispay message from projectcontroller for status-->
@if(session('status'))
<div class="alert alert-success" role="alert">
{{session('status')}}
</div>
@endif
</div>
<div class="card-body">
<div class="table-responsive">
<table id="datatable" class="table table-stripped">
<thead class=" text-primary">
<th>ID</th>
<th>Name</th>
<th>Description</th>
<th>EDIT</th>
</thead>
<tbody>
@foreach($files as $file)
<tr>
<td>{{$file->id}}</td>
<td>{{$file->filename}}</td>
<td>{{$file->type}}</td>
<td>{{$file->size}}</td>
<a href="javascript:void(0)" class="btn btn-danger" data-toggle="modal" data-target="#deletemodal">Delete</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection @section('scripts') @endsection
fileupload.blade.php
@extends('layouts.studentlayout')
@section('title')
Project Edit Dashboard
@endsection
@section('content')
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h4 class="card-title"> File Upload</h4>
//errors display from the file controller
@if($errors->any())
<div class="alert alert-danger">
<ul>
@foreach($errors->all() as $error)
<li>{{$error}}</li>
@endforeach
</ul>
</div>
@endif
<!-- we add a form -->
<form action="{{ route('/save-file')}}" method="post" enctype="multipart/form-data" >
@csrf
<div class="modal-body">
<div class="row mb-3">
<label for="type">Submission Type</label>
<div class="col-md-3">
<select id="select" aria-label="Default select example" name="type" required autocomplete="level" autofocus>
<option value="" selected>Select Submission Type</option>
<option value="proposal">Proposal (docx)</option>
<option value="presentation">Presentation (PPT)</option>
<option value="report">Report (docx)</option>
</select>
</div>
</div>
<div class="fileinput fileinput-new" data-provides="fileinput">
<div>
<span class="btn btn-raised btn-round btn-default btn-file">
<input type="file" name="filename" class="form-control" accept=".jpg,.jpeg,.bmp,.png,.gif,.doc,.docx,.csv,.rtf,.xlsx,.xls,.txt,.pdf,.zip" /></span>
<br />
<a href="#pablo" class="btn btn-danger btn-round fileinput-exists" data-dismiss="fileinput">Upload</a>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
My route (web.php)
Route::get('/upload', 'App\Http\Controllers\Student\FilesController@index');
Route::get('/fileupload','App\Http\Controllers\Student\FilesController@create');
Route::post('/save-file','App\Http\Controllers\Student\FilesController@store');