Vote count:
0
I am just using a form to upload a file and a simple route to move the file in my /public/images folder. But the moved file cant be found in the images directory. I am following Leanpub Laravel CodeBright book.
//my blade template
<form action="{{ url('handle-form') }}"
method="POST"
enctype="multipart/form-data">
<input type="file" name="book" />
<input type="submit">
</form>
//route.php
Route::get('/', function()
{
return View::make('form');
});
Route::post('handle-form', function()
{
Input::file('book')->move('/public/images');
return 'File was moved.';
});
after pressing submit button 'File was moved.' shown but there is no file in the desired directory.
asked 2 mins ago
Move File doesn't work in Laravel 4
Aucun commentaire:
Enregistrer un commentaire