Laravel BadMethodCallException: Method [signdoc] does not exist
Sorry for the long post. I am new to Laravel. I am trying to add an online hand signature functionality to a controller. I have chosen to use the javascript library https://github.com/szimek/signature_pad. I want to use an ajax call to the controller to save the signature image through php but i get a http 500 error whenever I try make the ajax call. Any help would be greatly appreciated as I'm all out of ideas.
In my laravel log
[2018-12-27 22:18:12] local.ERROR: BadMethodCallException: Method [signdoc] does not exist. in D:...vendorlaravelframeworksrcIlluminateRoutingController.php:82
On the view, I am able populate a signature pad with the button functionalities. This is the javascript from the view where the ajax called is made. I followed this guide https://github.com/szimek/signature_pad/issues/167
<script type="text/javascript">
console.log("test");
var signaturePad = new SignaturePad(document.getElementById('signature-pad'), {
backgroundColor: '#c6c6c6',
penColor: 'rgb(0, 0, 0)'
});
var signButton = document.getElementById('sign');
var cancelButton = document.getElementById('clear');
var undoButton = document.getElementById('undo');
signButton.addEventListener('click', function (event) {
event.preventDefault();
if(!signaturePad.isEmpty()){
//TODO
//save picture
var data = signaturePad.toDataURL('image/png');
var imagen = data.replace(/^data:image/(png|jpg);base64,/, "");
var fdata = new FormData();
fdata.append('imgData', imagen);
console.log(data);
console.log(window.document.location);
var url =
jQuery.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
type:"POST",
dataType: "json", //datatype expected to be returned
url:"/transaction/modify/signdoc",
data: fdata,
sucess: function (data) {
if(data && data.status == "success"){
bootbox.alert("signed document!!" + data.info);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.responseText);
console.log(textStatus);
console.log(errorThrown);
}
}).done(function(msg) {
// Image saved successfuly.
alert('success');
}).fail(function (data) {
alert('failed');
});
}
});
cancelButton.addEventListener('click', function (event) {
signaturePad.clear();
});
undoButton.addEventListener('click', function (event) {
var data = signaturePad.toData();
if (data) {
data.pop(); // remove the last dot or line
signaturePad.fromData(data);
}
});
</script>
In my route
Route::get('report/transactionsreporting','TransactionsController@reportindex');
Route::get('report/AverageNightlyRate','TransactionsController@reportindex');
Route::get('report/transactionsProportionRate','TransactionsController@reportproportionrate');
Route::get('report/transactionsAverageRental','TransactionsController@reportaveragerental');
Route::get('report/transactionsGroupSize','TransactionsController@reportgroupsize');
Route::get('report/transactionsInquiryCheckInDate','TransactionsController@reportinquirycheckindate');
Route::get('report/transactionsClosed','TransactionsController@reporttranclosed');
Route::get('report/transactionsRate','TransactionsController@reportindex');
Route::get('report/inquiryCheckInDate','InquirysController@reportinquirycheckindate');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc');
//this is the route to the function in controller
Route::get('transaction/getbc/{transactionID}','TransactionsController@getBC');
Route::get('transaction/showAll', 'TransactionsController@show');
Route::post('transaction/delete', 'TransactionsController@delete');
Route::get('transaction/modify/{id}', 'TransactionsController@modify');
Route::post('transaction/modify/store', 'TransactionsController@update');
Route::post('transaction/modify/addcashflow', 'TransactionsController@addcashflow');
Route::post('transaction/modify/modifycashflow', 'TransactionsController@modifycashflow');
Route::post('transaction/modify/deletecashflow', 'TransactionsController@deletecashflow');
Route::post('transaction/modify/deletedoc', 'TransactionsController@deletedoc');
Route::get('transaction/confirm','TransactionsController@confirmInquiry');
Route::post('transaction/add','TransactionsController@add');
Route::get('/transaction/download/{id}', 'TransactionsController@getDownload');
In my transaction controller
class TransactionsController extends Controller
{
public function signdoc(Request $request){
//TODO
// save image
echo "signdoc";
log::info("sign doc controller asdfsadfsafsadfsad");
return response()->json(['status'=>'success','info'=>' entered sign doc function!!'])
->header('Content-Type','json');
}
}
in the terminal I check the php artisan route:list and the routes seems correct
| web |
| | POST | transaction/add | | AppHttpControllersTransactionsController@add
| web,auth |
| | GET|HEAD | transaction/confirm | | AppHttpControllersTransactionsController@confirmInquiry
| web,auth |
| | POST | transaction/delete | | AppHttpControllersTransactionsController@delete
| web,auth |
| | GET|HEAD | transaction/download/{id} | | AppHttpControllersTransactionsController@getDownload
| web,auth |
| | GET|HEAD | transaction/getbc/{transactionID} | | AppHttpControllersTransactionsController@getBC
| web,auth |
| | POST | transaction/modify/addcashflow | | AppHttpControllersTransactionsController@addcashflow
| web,auth |
| | POST | transaction/modify/deletecashflow | | AppHttpControllersTransactionsController@deletecashflow
| web,auth |
| | POST | transaction/modify/deletedoc | | AppHttpControllersTransactionsController@deletedoc
| web,auth |
| | POST | transaction/modify/modifycashflow | | AppHttpControllersTransactionsController@modifycashflow
| web,auth |
| | POST | transaction/modify/signdoc | | AppHttpControllersTransactionsController@signdoc
| web,auth |
| | POST | transaction/modify/store | | AppHttpControllersTransactionsController@update
| web,auth |
| | GET|HEAD | transaction/modify/{id} | | AppHttpControllersTransactionsController@modify
| web,auth |
| | GET|HEAD | transaction/showAll | | AppHttpControllersTransactionsController@show
| web,auth |
| | GET|HEAD | transactionDelete/showAll | | AppHttpControllersTransactionsDeleteController@show
| web,auth |
| | POST | updateOwner | | AppHttpControllersHouseOwnersController@updateOwner
| web,auth |
| | GET|HEAD | welcome | | Closure
| web |
ajax laravel post controller
add a comment |
Sorry for the long post. I am new to Laravel. I am trying to add an online hand signature functionality to a controller. I have chosen to use the javascript library https://github.com/szimek/signature_pad. I want to use an ajax call to the controller to save the signature image through php but i get a http 500 error whenever I try make the ajax call. Any help would be greatly appreciated as I'm all out of ideas.
In my laravel log
[2018-12-27 22:18:12] local.ERROR: BadMethodCallException: Method [signdoc] does not exist. in D:...vendorlaravelframeworksrcIlluminateRoutingController.php:82
On the view, I am able populate a signature pad with the button functionalities. This is the javascript from the view where the ajax called is made. I followed this guide https://github.com/szimek/signature_pad/issues/167
<script type="text/javascript">
console.log("test");
var signaturePad = new SignaturePad(document.getElementById('signature-pad'), {
backgroundColor: '#c6c6c6',
penColor: 'rgb(0, 0, 0)'
});
var signButton = document.getElementById('sign');
var cancelButton = document.getElementById('clear');
var undoButton = document.getElementById('undo');
signButton.addEventListener('click', function (event) {
event.preventDefault();
if(!signaturePad.isEmpty()){
//TODO
//save picture
var data = signaturePad.toDataURL('image/png');
var imagen = data.replace(/^data:image/(png|jpg);base64,/, "");
var fdata = new FormData();
fdata.append('imgData', imagen);
console.log(data);
console.log(window.document.location);
var url =
jQuery.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
type:"POST",
dataType: "json", //datatype expected to be returned
url:"/transaction/modify/signdoc",
data: fdata,
sucess: function (data) {
if(data && data.status == "success"){
bootbox.alert("signed document!!" + data.info);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.responseText);
console.log(textStatus);
console.log(errorThrown);
}
}).done(function(msg) {
// Image saved successfuly.
alert('success');
}).fail(function (data) {
alert('failed');
});
}
});
cancelButton.addEventListener('click', function (event) {
signaturePad.clear();
});
undoButton.addEventListener('click', function (event) {
var data = signaturePad.toData();
if (data) {
data.pop(); // remove the last dot or line
signaturePad.fromData(data);
}
});
</script>
In my route
Route::get('report/transactionsreporting','TransactionsController@reportindex');
Route::get('report/AverageNightlyRate','TransactionsController@reportindex');
Route::get('report/transactionsProportionRate','TransactionsController@reportproportionrate');
Route::get('report/transactionsAverageRental','TransactionsController@reportaveragerental');
Route::get('report/transactionsGroupSize','TransactionsController@reportgroupsize');
Route::get('report/transactionsInquiryCheckInDate','TransactionsController@reportinquirycheckindate');
Route::get('report/transactionsClosed','TransactionsController@reporttranclosed');
Route::get('report/transactionsRate','TransactionsController@reportindex');
Route::get('report/inquiryCheckInDate','InquirysController@reportinquirycheckindate');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc');
//this is the route to the function in controller
Route::get('transaction/getbc/{transactionID}','TransactionsController@getBC');
Route::get('transaction/showAll', 'TransactionsController@show');
Route::post('transaction/delete', 'TransactionsController@delete');
Route::get('transaction/modify/{id}', 'TransactionsController@modify');
Route::post('transaction/modify/store', 'TransactionsController@update');
Route::post('transaction/modify/addcashflow', 'TransactionsController@addcashflow');
Route::post('transaction/modify/modifycashflow', 'TransactionsController@modifycashflow');
Route::post('transaction/modify/deletecashflow', 'TransactionsController@deletecashflow');
Route::post('transaction/modify/deletedoc', 'TransactionsController@deletedoc');
Route::get('transaction/confirm','TransactionsController@confirmInquiry');
Route::post('transaction/add','TransactionsController@add');
Route::get('/transaction/download/{id}', 'TransactionsController@getDownload');
In my transaction controller
class TransactionsController extends Controller
{
public function signdoc(Request $request){
//TODO
// save image
echo "signdoc";
log::info("sign doc controller asdfsadfsafsadfsad");
return response()->json(['status'=>'success','info'=>' entered sign doc function!!'])
->header('Content-Type','json');
}
}
in the terminal I check the php artisan route:list and the routes seems correct
| web |
| | POST | transaction/add | | AppHttpControllersTransactionsController@add
| web,auth |
| | GET|HEAD | transaction/confirm | | AppHttpControllersTransactionsController@confirmInquiry
| web,auth |
| | POST | transaction/delete | | AppHttpControllersTransactionsController@delete
| web,auth |
| | GET|HEAD | transaction/download/{id} | | AppHttpControllersTransactionsController@getDownload
| web,auth |
| | GET|HEAD | transaction/getbc/{transactionID} | | AppHttpControllersTransactionsController@getBC
| web,auth |
| | POST | transaction/modify/addcashflow | | AppHttpControllersTransactionsController@addcashflow
| web,auth |
| | POST | transaction/modify/deletecashflow | | AppHttpControllersTransactionsController@deletecashflow
| web,auth |
| | POST | transaction/modify/deletedoc | | AppHttpControllersTransactionsController@deletedoc
| web,auth |
| | POST | transaction/modify/modifycashflow | | AppHttpControllersTransactionsController@modifycashflow
| web,auth |
| | POST | transaction/modify/signdoc | | AppHttpControllersTransactionsController@signdoc
| web,auth |
| | POST | transaction/modify/store | | AppHttpControllersTransactionsController@update
| web,auth |
| | GET|HEAD | transaction/modify/{id} | | AppHttpControllersTransactionsController@modify
| web,auth |
| | GET|HEAD | transaction/showAll | | AppHttpControllersTransactionsController@show
| web,auth |
| | GET|HEAD | transactionDelete/showAll | | AppHttpControllersTransactionsDeleteController@show
| web,auth |
| | POST | updateOwner | | AppHttpControllersHouseOwnersController@updateOwner
| web,auth |
| | GET|HEAD | welcome | | Closure
| web |
ajax laravel post controller
Try with the absolute url or if your are in a blade file {{ url('/transaction/modify/signdoc') }}
– Louis R
Dec 28 '18 at 0:37
add a comment |
Sorry for the long post. I am new to Laravel. I am trying to add an online hand signature functionality to a controller. I have chosen to use the javascript library https://github.com/szimek/signature_pad. I want to use an ajax call to the controller to save the signature image through php but i get a http 500 error whenever I try make the ajax call. Any help would be greatly appreciated as I'm all out of ideas.
In my laravel log
[2018-12-27 22:18:12] local.ERROR: BadMethodCallException: Method [signdoc] does not exist. in D:...vendorlaravelframeworksrcIlluminateRoutingController.php:82
On the view, I am able populate a signature pad with the button functionalities. This is the javascript from the view where the ajax called is made. I followed this guide https://github.com/szimek/signature_pad/issues/167
<script type="text/javascript">
console.log("test");
var signaturePad = new SignaturePad(document.getElementById('signature-pad'), {
backgroundColor: '#c6c6c6',
penColor: 'rgb(0, 0, 0)'
});
var signButton = document.getElementById('sign');
var cancelButton = document.getElementById('clear');
var undoButton = document.getElementById('undo');
signButton.addEventListener('click', function (event) {
event.preventDefault();
if(!signaturePad.isEmpty()){
//TODO
//save picture
var data = signaturePad.toDataURL('image/png');
var imagen = data.replace(/^data:image/(png|jpg);base64,/, "");
var fdata = new FormData();
fdata.append('imgData', imagen);
console.log(data);
console.log(window.document.location);
var url =
jQuery.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
type:"POST",
dataType: "json", //datatype expected to be returned
url:"/transaction/modify/signdoc",
data: fdata,
sucess: function (data) {
if(data && data.status == "success"){
bootbox.alert("signed document!!" + data.info);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.responseText);
console.log(textStatus);
console.log(errorThrown);
}
}).done(function(msg) {
// Image saved successfuly.
alert('success');
}).fail(function (data) {
alert('failed');
});
}
});
cancelButton.addEventListener('click', function (event) {
signaturePad.clear();
});
undoButton.addEventListener('click', function (event) {
var data = signaturePad.toData();
if (data) {
data.pop(); // remove the last dot or line
signaturePad.fromData(data);
}
});
</script>
In my route
Route::get('report/transactionsreporting','TransactionsController@reportindex');
Route::get('report/AverageNightlyRate','TransactionsController@reportindex');
Route::get('report/transactionsProportionRate','TransactionsController@reportproportionrate');
Route::get('report/transactionsAverageRental','TransactionsController@reportaveragerental');
Route::get('report/transactionsGroupSize','TransactionsController@reportgroupsize');
Route::get('report/transactionsInquiryCheckInDate','TransactionsController@reportinquirycheckindate');
Route::get('report/transactionsClosed','TransactionsController@reporttranclosed');
Route::get('report/transactionsRate','TransactionsController@reportindex');
Route::get('report/inquiryCheckInDate','InquirysController@reportinquirycheckindate');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc');
//this is the route to the function in controller
Route::get('transaction/getbc/{transactionID}','TransactionsController@getBC');
Route::get('transaction/showAll', 'TransactionsController@show');
Route::post('transaction/delete', 'TransactionsController@delete');
Route::get('transaction/modify/{id}', 'TransactionsController@modify');
Route::post('transaction/modify/store', 'TransactionsController@update');
Route::post('transaction/modify/addcashflow', 'TransactionsController@addcashflow');
Route::post('transaction/modify/modifycashflow', 'TransactionsController@modifycashflow');
Route::post('transaction/modify/deletecashflow', 'TransactionsController@deletecashflow');
Route::post('transaction/modify/deletedoc', 'TransactionsController@deletedoc');
Route::get('transaction/confirm','TransactionsController@confirmInquiry');
Route::post('transaction/add','TransactionsController@add');
Route::get('/transaction/download/{id}', 'TransactionsController@getDownload');
In my transaction controller
class TransactionsController extends Controller
{
public function signdoc(Request $request){
//TODO
// save image
echo "signdoc";
log::info("sign doc controller asdfsadfsafsadfsad");
return response()->json(['status'=>'success','info'=>' entered sign doc function!!'])
->header('Content-Type','json');
}
}
in the terminal I check the php artisan route:list and the routes seems correct
| web |
| | POST | transaction/add | | AppHttpControllersTransactionsController@add
| web,auth |
| | GET|HEAD | transaction/confirm | | AppHttpControllersTransactionsController@confirmInquiry
| web,auth |
| | POST | transaction/delete | | AppHttpControllersTransactionsController@delete
| web,auth |
| | GET|HEAD | transaction/download/{id} | | AppHttpControllersTransactionsController@getDownload
| web,auth |
| | GET|HEAD | transaction/getbc/{transactionID} | | AppHttpControllersTransactionsController@getBC
| web,auth |
| | POST | transaction/modify/addcashflow | | AppHttpControllersTransactionsController@addcashflow
| web,auth |
| | POST | transaction/modify/deletecashflow | | AppHttpControllersTransactionsController@deletecashflow
| web,auth |
| | POST | transaction/modify/deletedoc | | AppHttpControllersTransactionsController@deletedoc
| web,auth |
| | POST | transaction/modify/modifycashflow | | AppHttpControllersTransactionsController@modifycashflow
| web,auth |
| | POST | transaction/modify/signdoc | | AppHttpControllersTransactionsController@signdoc
| web,auth |
| | POST | transaction/modify/store | | AppHttpControllersTransactionsController@update
| web,auth |
| | GET|HEAD | transaction/modify/{id} | | AppHttpControllersTransactionsController@modify
| web,auth |
| | GET|HEAD | transaction/showAll | | AppHttpControllersTransactionsController@show
| web,auth |
| | GET|HEAD | transactionDelete/showAll | | AppHttpControllersTransactionsDeleteController@show
| web,auth |
| | POST | updateOwner | | AppHttpControllersHouseOwnersController@updateOwner
| web,auth |
| | GET|HEAD | welcome | | Closure
| web |
ajax laravel post controller
Sorry for the long post. I am new to Laravel. I am trying to add an online hand signature functionality to a controller. I have chosen to use the javascript library https://github.com/szimek/signature_pad. I want to use an ajax call to the controller to save the signature image through php but i get a http 500 error whenever I try make the ajax call. Any help would be greatly appreciated as I'm all out of ideas.
In my laravel log
[2018-12-27 22:18:12] local.ERROR: BadMethodCallException: Method [signdoc] does not exist. in D:...vendorlaravelframeworksrcIlluminateRoutingController.php:82
On the view, I am able populate a signature pad with the button functionalities. This is the javascript from the view where the ajax called is made. I followed this guide https://github.com/szimek/signature_pad/issues/167
<script type="text/javascript">
console.log("test");
var signaturePad = new SignaturePad(document.getElementById('signature-pad'), {
backgroundColor: '#c6c6c6',
penColor: 'rgb(0, 0, 0)'
});
var signButton = document.getElementById('sign');
var cancelButton = document.getElementById('clear');
var undoButton = document.getElementById('undo');
signButton.addEventListener('click', function (event) {
event.preventDefault();
if(!signaturePad.isEmpty()){
//TODO
//save picture
var data = signaturePad.toDataURL('image/png');
var imagen = data.replace(/^data:image/(png|jpg);base64,/, "");
var fdata = new FormData();
fdata.append('imgData', imagen);
console.log(data);
console.log(window.document.location);
var url =
jQuery.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
type:"POST",
dataType: "json", //datatype expected to be returned
url:"/transaction/modify/signdoc",
data: fdata,
sucess: function (data) {
if(data && data.status == "success"){
bootbox.alert("signed document!!" + data.info);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.responseText);
console.log(textStatus);
console.log(errorThrown);
}
}).done(function(msg) {
// Image saved successfuly.
alert('success');
}).fail(function (data) {
alert('failed');
});
}
});
cancelButton.addEventListener('click', function (event) {
signaturePad.clear();
});
undoButton.addEventListener('click', function (event) {
var data = signaturePad.toData();
if (data) {
data.pop(); // remove the last dot or line
signaturePad.fromData(data);
}
});
</script>
In my route
Route::get('report/transactionsreporting','TransactionsController@reportindex');
Route::get('report/AverageNightlyRate','TransactionsController@reportindex');
Route::get('report/transactionsProportionRate','TransactionsController@reportproportionrate');
Route::get('report/transactionsAverageRental','TransactionsController@reportaveragerental');
Route::get('report/transactionsGroupSize','TransactionsController@reportgroupsize');
Route::get('report/transactionsInquiryCheckInDate','TransactionsController@reportinquirycheckindate');
Route::get('report/transactionsClosed','TransactionsController@reporttranclosed');
Route::get('report/transactionsRate','TransactionsController@reportindex');
Route::get('report/inquiryCheckInDate','InquirysController@reportinquirycheckindate');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc');
//this is the route to the function in controller
Route::get('transaction/getbc/{transactionID}','TransactionsController@getBC');
Route::get('transaction/showAll', 'TransactionsController@show');
Route::post('transaction/delete', 'TransactionsController@delete');
Route::get('transaction/modify/{id}', 'TransactionsController@modify');
Route::post('transaction/modify/store', 'TransactionsController@update');
Route::post('transaction/modify/addcashflow', 'TransactionsController@addcashflow');
Route::post('transaction/modify/modifycashflow', 'TransactionsController@modifycashflow');
Route::post('transaction/modify/deletecashflow', 'TransactionsController@deletecashflow');
Route::post('transaction/modify/deletedoc', 'TransactionsController@deletedoc');
Route::get('transaction/confirm','TransactionsController@confirmInquiry');
Route::post('transaction/add','TransactionsController@add');
Route::get('/transaction/download/{id}', 'TransactionsController@getDownload');
In my transaction controller
class TransactionsController extends Controller
{
public function signdoc(Request $request){
//TODO
// save image
echo "signdoc";
log::info("sign doc controller asdfsadfsafsadfsad");
return response()->json(['status'=>'success','info'=>' entered sign doc function!!'])
->header('Content-Type','json');
}
}
in the terminal I check the php artisan route:list and the routes seems correct
| web |
| | POST | transaction/add | | AppHttpControllersTransactionsController@add
| web,auth |
| | GET|HEAD | transaction/confirm | | AppHttpControllersTransactionsController@confirmInquiry
| web,auth |
| | POST | transaction/delete | | AppHttpControllersTransactionsController@delete
| web,auth |
| | GET|HEAD | transaction/download/{id} | | AppHttpControllersTransactionsController@getDownload
| web,auth |
| | GET|HEAD | transaction/getbc/{transactionID} | | AppHttpControllersTransactionsController@getBC
| web,auth |
| | POST | transaction/modify/addcashflow | | AppHttpControllersTransactionsController@addcashflow
| web,auth |
| | POST | transaction/modify/deletecashflow | | AppHttpControllersTransactionsController@deletecashflow
| web,auth |
| | POST | transaction/modify/deletedoc | | AppHttpControllersTransactionsController@deletedoc
| web,auth |
| | POST | transaction/modify/modifycashflow | | AppHttpControllersTransactionsController@modifycashflow
| web,auth |
| | POST | transaction/modify/signdoc | | AppHttpControllersTransactionsController@signdoc
| web,auth |
| | POST | transaction/modify/store | | AppHttpControllersTransactionsController@update
| web,auth |
| | GET|HEAD | transaction/modify/{id} | | AppHttpControllersTransactionsController@modify
| web,auth |
| | GET|HEAD | transaction/showAll | | AppHttpControllersTransactionsController@show
| web,auth |
| | GET|HEAD | transactionDelete/showAll | | AppHttpControllersTransactionsDeleteController@show
| web,auth |
| | POST | updateOwner | | AppHttpControllersHouseOwnersController@updateOwner
| web,auth |
| | GET|HEAD | welcome | | Closure
| web |
ajax laravel post controller
ajax laravel post controller
asked Dec 28 '18 at 0:23
ImTheRealOne
203
203
Try with the absolute url or if your are in a blade file {{ url('/transaction/modify/signdoc') }}
– Louis R
Dec 28 '18 at 0:37
add a comment |
Try with the absolute url or if your are in a blade file {{ url('/transaction/modify/signdoc') }}
– Louis R
Dec 28 '18 at 0:37
Try with the absolute url or if your are in a blade file {{ url('/transaction/modify/signdoc') }}
– Louis R
Dec 28 '18 at 0:37
Try with the absolute url or if your are in a blade file {{ url('/transaction/modify/signdoc') }}
– Louis R
Dec 28 '18 at 0:37
add a comment |
1 Answer
1
active
oldest
votes
Please use name in the route ... ->name('transaction.modify.sincdoc');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc')->name('transaction.modify.sincdoc');
And the blade where you are writing the url use route clause
url:"{{route('transaction.modify.syncdoc')}}",
Please try this and let me know how it works :)
Thank You for the response but it turns out the laravel Controller folder had some back up files with the same name in a .bak folder in Controller folder. Laravel was calling the TransactionsController in the .bak folder and I was modifying TransactionsController in the controller folder.
– ImTheRealOne
yesterday
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53952330%2flaravel-badmethodcallexception-method-signdoc-does-not-exist%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please use name in the route ... ->name('transaction.modify.sincdoc');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc')->name('transaction.modify.sincdoc');
And the blade where you are writing the url use route clause
url:"{{route('transaction.modify.syncdoc')}}",
Please try this and let me know how it works :)
Thank You for the response but it turns out the laravel Controller folder had some back up files with the same name in a .bak folder in Controller folder. Laravel was calling the TransactionsController in the .bak folder and I was modifying TransactionsController in the controller folder.
– ImTheRealOne
yesterday
add a comment |
Please use name in the route ... ->name('transaction.modify.sincdoc');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc')->name('transaction.modify.sincdoc');
And the blade where you are writing the url use route clause
url:"{{route('transaction.modify.syncdoc')}}",
Please try this and let me know how it works :)
Thank You for the response but it turns out the laravel Controller folder had some back up files with the same name in a .bak folder in Controller folder. Laravel was calling the TransactionsController in the .bak folder and I was modifying TransactionsController in the controller folder.
– ImTheRealOne
yesterday
add a comment |
Please use name in the route ... ->name('transaction.modify.sincdoc');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc')->name('transaction.modify.sincdoc');
And the blade where you are writing the url use route clause
url:"{{route('transaction.modify.syncdoc')}}",
Please try this and let me know how it works :)
Please use name in the route ... ->name('transaction.modify.sincdoc');
Route::post('transaction/modify/signdoc', 'TransactionsController@signdoc')->name('transaction.modify.sincdoc');
And the blade where you are writing the url use route clause
url:"{{route('transaction.modify.syncdoc')}}",
Please try this and let me know how it works :)
answered Dec 28 '18 at 1:30
Manuel Eduardo Romero
21115
21115
Thank You for the response but it turns out the laravel Controller folder had some back up files with the same name in a .bak folder in Controller folder. Laravel was calling the TransactionsController in the .bak folder and I was modifying TransactionsController in the controller folder.
– ImTheRealOne
yesterday
add a comment |
Thank You for the response but it turns out the laravel Controller folder had some back up files with the same name in a .bak folder in Controller folder. Laravel was calling the TransactionsController in the .bak folder and I was modifying TransactionsController in the controller folder.
– ImTheRealOne
yesterday
Thank You for the response but it turns out the laravel Controller folder had some back up files with the same name in a .bak folder in Controller folder. Laravel was calling the TransactionsController in the .bak folder and I was modifying TransactionsController in the controller folder.
– ImTheRealOne
yesterday
Thank You for the response but it turns out the laravel Controller folder had some back up files with the same name in a .bak folder in Controller folder. Laravel was calling the TransactionsController in the .bak folder and I was modifying TransactionsController in the controller folder.
– ImTheRealOne
yesterday
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53952330%2flaravel-badmethodcallexception-method-signdoc-does-not-exist%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try with the absolute url or if your are in a blade file {{ url('/transaction/modify/signdoc') }}
– Louis R
Dec 28 '18 at 0:37