I Have a question to Laravel. I made an Web Application with Laravel. On my local machine everything works perfect now i did it on the Host and here i struggle a little. When i call the site it goes first to my Controller and then to my view and that works fine. but in my view i have some forms and they don't work at all.
On my local machine i would send the form like this:
<form id="main-contact-form" name="contact-form" method="post" action="/SendMail">
<div class="row wow fadeInUp" data-wow-duration="1000ms" data-wow-delay="300ms">
<div class="col-sm-6">
<div class="form-group">
<input style="background-color:black; color:white" type="text" name="name" class="form-control" placeholder="Name" required="required">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<input style="background-color:black; color:white" type="email" name="email" class="form-control" placeholder="Email Address" required="required">
</div>
</div>
</div>
<div class="form-group">
<input style="background-color:black; color:white" type="text" name="subject" class="form-control" placeholder="Subject" required="required">
</div>
<div class="form-group">
<textarea style="background-color:black; color:white" name="message" id="message" class="form-control" rows="4" placeholder="Enter your message" required="required"></textarea>
</div>
<div class="form-group">
<button type="submit" class="btn-submit">Sende Nachricht</button>
</div>
</form>
And in my web.php file i would define the route like this
Route::post('/SendMail', 'MyController@SendMail');
And on the local machine this works perfect but not on the Host here i am getting the error 404 object not found. Why ? Please Help me and i am sorry for my bad english but i hope you still understand what i mean
My first thought is do you have the Apache mod_rewrite enabled on your server? I am assuming you are running Apache and Linux here. It is needed to make URL rewriting work.
On Linux you would typically run these commands:
sudo a2enmod rewrite
sudo service apache2 restart
My Laptop Has The operational System Windows but i am Not sure about The Server i am using hostpoint.ch. I try to google it but i am Not sure where to look
Found it The Server is an Apache