i m new to laravel 4.2 i'm am developing a web application ..now i want to store a profile picture into database.
this is my controller file code
public function profilepicture(){
$data = Input::hasfile('file');
DB::table('company')->insert(array('data'=>$data));
return Redirect::to('/companyreg');
}
this is from route file
Route::any('/company_profile','CompanyController@profilepicture');
this is form view
<form method="post" action="{{url('/company_profile')}}">
<input type="file" name="file" />
<input type="submit" name="submitfile" value="upload" />
</form>
Aucun commentaire:
Enregistrer un commentaire