Adding a route prop to dynamically set the route

parent ff63ddc5
......@@ -136,7 +136,8 @@
mixins: [Translate, Slugify],
props: {
locales: {default: null},
pageId: {default: null}
pageId: {default: null},
route: {default: null},
},
data() {
return {
......@@ -170,7 +171,7 @@
onSubmit() {
this.form = new Form(_.merge(this.page, {tags: this.tags}));
this.loading = true;
this.form.post(route('api.page.page.store'))
this.form.post(this.route)
.then(response => {
this.loading = false;
this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment