How to get multiple parameters from url as wildcard in laravel

Posted 2 years ago by anonymox

'm trying to get multiple parameters from url and send them to view but what I get is undefined variable. how to fix this :

api.php

Route::get('adwidth/{width}/adheight/{height}/aduser/{user_id}', function(){
    return view('frame', compact('width','height','user_id'));
});

frame.blade.php

@section('content')
    <h3>{{ $width }}</h3>
@stop

I'm using laravel 5.3

Please sign in or create an account to participate in this conversation.