###前提・実現したいこと
includeでファイルアップロードのボタンを設置したのですが、ルーティングがうまくいかずcontrollerのfunctionが走りません。
どこが間違っているのか、原因がわかっておりません。
ご教授いただけますでしょうか。
###該当のソースコード
php
1route.php 2Route::post('publicregister','PublicRegisterController@uploadfile');
php
1PublicRegisterController.php 2public function uploadfile() { 3 return request()->input('response') === 'json' ? response()->json(['id'=>$file['id'],'name'=>$name]) : $this->search(); 4}
<!DOCTYPE html> <html lang="ja"> <body> <form method="POST" action="{{url('publicregister?action=uploadfile')}}"> <label for="mailAttach"> アップロード <input type="file" class="hide" id="mailAttach" name="file"> </label> </form> </body> </html>
↑のblade.phpをincludeしています。
よろしくお願いいたします。
###補足情報(言語/FW/ツール等のバージョンなど)
laravel 5.1
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/08/01 09:47
2017/08/01 10:14 編集