{!."/> {!."/> {!"/>
خرید بک لینک

Vote count: 0

Hell, I am building a website with laravel5.2 ,I did a form in layout blade

<form action="POST"  action="{{url('register')}}" class="searchform">
       {!! csrf_field() !!}
   <input type="email" placeholder="Your email address" name="email" />
  <button type="submit" class="btn btn-default" ><i class="fa fa-arrow-circle-o-right"></i></button>
<p>Get the most recent updates from <br />our site and be updated your self...</p>
    </form>

And this is my route

Route::post('/subscribe', 'Front@subscrib');

And this function in the controller Front

public function subscrib()
    {
        echo"we in subsc function";
       if (Request::isMethod('post')) {
            Subscribe::create([
                'email' => Request::get('email')

            ]);
       }

    }

But when i write email in the form ,I get this error

NotFoundHttpException in RouteCollection.php line 161:
in RouteCollection.php line 161
at RouteCollection->match(object(Request)) in Router.php line 823
at Router->findRoute(object(Request)) in Router.php line 691

And url go to

http://localhost/larashop/public/POST?_token=ALqduK9gW6Xdnq9iOJzyu7kMji1z3LCXDgeQehoO&email=azhaabil%40yahoo.com

please any one help me.

asked 30 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 4 ارديبهشت 1395 ساعت: 12:47

صفحه بندی