Form
<form files ="true" action="{{ route('mynewproject') }}">
<input type="file" name="projectimage" id="projectimage">
<button type="submit">Submit</button>
</form>
DashbordController
This is my controller to check only the input has file or not but it gives me no files:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\project;
use Input;
use Image;
use File;
class DashbordController extends Controller
{
public function projectAdded(Request $request){
if(Input::hasFile('projectimage')){
return $request->projectimage;
}else{
return 'no file';
}
}