[Vuejs]-How to send data using get without display parameters in url?

0๐Ÿ‘

You can do it like this with Input and get method:

View

{!! Form::open(['route' => 'shop.payment','method' => 'GET']) !!}
    <input type="hidden" name="result_type">
    <input type="hidden" name="result_data"">
    ...
    <input type="radio" name="payment_method" value="transfer">
    ....
    <checkout-view></checkout-view>
{!! Form::close() !!}

Route

Route::get('/test/route', 'TestController@yourFunction');

Controller

public function yourFunction(){

    $result_type = Input::get('result_type');
    $result_data = Input::get('result_date');
    ......

}

I hope you understand.

๐Ÿ‘คSagar Gautam

0๐Ÿ‘

Route::group(['prefix' => 'shop','as'=>'shop.'], function () {
    Route::get('detail', function(){
    return view('shop.detail');
    });
});

I believe the route comes out as shopdetail, not shop/detail

Type the command php artisan route:list to see how laravel sees the urls.

๐Ÿ‘คQuezler

0๐Ÿ‘

Use return redirect to another route instead of returning a view if there is no auth. In another route on which you are redirecting return the original view which you want to display when there is no authenticated user.

๐Ÿ‘คHamza Dairywala

Leave a comment