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

Issue with translations. #77

Closed
Tjoosten opened this issue Dec 6, 2017 · 1 comment
Closed

Issue with translations. #77

Tjoosten opened this issue Dec 6, 2017 · 1 comment

Comments

@Tjoosten
Copy link

Tjoosten commented Dec 6, 2017

Hi,

First of all thanks for the package. But now i got a issue/question.
I got the following inputs.

array:7 [▼
  "_token" => "a2r5e8ehAzyeu67kq2YPPM785hFgI1tokurBVMw3"
  "publish_date" => "2017-12-06"
  "is_published" => "Y"
  "title" => array:3 [▼
    "nl" => "dfqsdfsqdf"
    "fr'" => null
    "en" => null
  ]
  "categories" => array:3 [▼
    "nl" => "test, test"
    "fr" => "test,test"
    "en" => "test,test"
  ]
  "message" => array:3 [▼
    "nl" => "<p>dfsdfdsqfqdsf</p>"
    "fr" => null
    "en" => null
  ]
  "article_image" => UploadedFile {#456 ▶}
]

And the following controller:

public function store(NewsValidator $input): RedirectResponse
    {
        $input->merge(['author_id' => $input->user()->id]);

        if ($article = $this->newsRepository->create($input->except(['_token']))) {
            $article->addMedia($input->file('article_image'))->toMediaCollection('images');

            // Tags attachment.
            empty($input->categories['nl']) ?: array_map('trim', explode(',', $input->categories['nl']));

            flash("Het nieuws bericht is opgeslagen in het systeem.")->success();
        }

        return redirect()->route('news.admin.index');
    }

How can i integrate my tags with the needed translations. Into the my article logic? Because the docs look unclear to me.

@spatie-bot
Copy link

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

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

2 participants