Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ziggy dont return trust url #121

Closed
vahidrezazadeh opened this issue Jan 12, 2018 · 4 comments
Closed

ziggy dont return trust url #121

vahidrezazadeh opened this issue Jan 12, 2018 · 4 comments

Comments

@vahidrezazadeh
Copy link

hi , i use Laravel 5.5 and when use ziggy , this just return a js Object
for example i have this route in my web.php :
Route::get('get-additions/{id}', 'PlansController@get_additions') ->name('get_additions');
when i use ziggy :
console.log('ROUTE : ', route('admin.plans.get_additions', [plan_id]));
return this :
ziggy
i want use this in Angular js.
Tnx...

@josecanhelp
Copy link

josecanhelp commented Jan 13, 2018

Are you trying to get the generated url?

You might want to try console.log('ROUTE : ', route('admin.plans.get_additions', [plan_id]).url());

It's documented here.

@vahidrezazadeh
Copy link
Author

hi
i try console.log('ROUTE : ', route('admin.plans.get_additions', [plan_id])); and console.log('ROUTE : ', route('admin.plans.get_additions', [plan_id]).url()); just for test and check result.

@ankurk91
Copy link
Contributor

You might want to read this
#64

@DanielCoulbourne
Copy link
Contributor

use .url() to force a string literal:

i.e – route('posts.index').url()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants