Adding a route prop to dynamically set the route

parent ff63ddc5
...@@ -136,7 +136,8 @@ ...@@ -136,7 +136,8 @@
mixins: [Translate, Slugify], mixins: [Translate, Slugify],
props: { props: {
locales: {default: null}, locales: {default: null},
pageId: {default: null} pageId: {default: null},
route: {default: null},
}, },
data() { data() {
return { return {
...@@ -170,7 +171,7 @@ ...@@ -170,7 +171,7 @@
onSubmit() { onSubmit() {
this.form = new Form(_.merge(this.page, {tags: this.tags})); this.form = new Form(_.merge(this.page, {tags: this.tags}));
this.loading = true; this.loading = true;
this.form.post(route('api.page.page.store')) this.form.post(this.route)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
this.$message({ 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