Try running
php artisan clear-compiled
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using the Vimeo API wrapper from https://github.com/vinkla/vimeo.
When trying to use the facade Vimeo to upload the file (from the storage path) I am receiving this error:
TokenMismatchException in compiled.php line 2387:
My controller is rather simple, you can view the full controller here: http://laravel.io/bin/Lk3d9.
public function upload(UploadVideoFormRequest $request)
{
$directory = storage_path('tmp/' . md5(time()));
$video = $request->file('video');
// dd($video);
$filename = 'video' . '.' . $video->getClientOriginalExtension();
// dd($filename);
$video->move($directory, $filename);
$this->uploadVideo($directory, $filename);
return redirect()->back();
}
protected function uploadVideo($directory, $filename)
{
$video = $directory . $filename;
Vimeo::upload($video, false);
return $this;
}
The local upload works fine. I can see and view the video in my local storage. However, as soon as I pass the information off to the Vimeo service provider, it throws that error, any ideas?
Please or to participate in this conversation.