PHPackages                             betuulabs/laratube - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. betuulabs/laratube

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

betuulabs/laratube
==================

Manage YouTube Chanel with Laravel

06PHP

Since Aug 9Pushed 7y agoCompare

[ Source](https://github.com/BetuuLabs/laratube)[ Packagist](https://packagist.org/packages/betuulabs/laratube)[ RSS](/packages/betuulabs-laratube/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

LaraTube - Manage your Youtube chanel with Laravel
==================================================

[](#laratube---manage-your-youtube-chanel-with-laravel)

**Please note, that this package will only work with a single YouTube account and does not support multiple accounts.**

Installation
------------

[](#installation)

To install, use the following to pull the package in via Composer.

```
composer require betuulabs/laratube

```

Now register the Service provider in `config/app.php`

```
'providers' => [
    ...
    Betuulabs\Laratube\LaratubeServiceProvider::class,
],
```

And also add the alias to the same file.

```
'aliases' => [
    ...
    'Laratube' => Betuulabs\Laratube\Facades\Laratube::class,
],
```

Configuration
-------------

[](#configuration)

Now publish the `laratube.php` config and migrations.

```
php artisan vendor:publish --provider="Betuulabs\Laratube\LaratubeServiceProvider"

```

`php artisan migrate`

### Obtaining your Credentials

[](#obtaining-your-credentials)

Create an application on [Google's Developer Console](https://console.developers.google.com/project). You then need to head into **Credentials** within the Console to create Server key.

Create the credentials and you will be provided with a **Client ID** and **Client Secret**. These now need to be added to your `.env` file.

```
GOOGLE_CLIENT_ID=YOUR_CLIENT_ID
GOOGLE_CLIENT_SECRET=YOUR_SECRET

```

Code example
============

[](#code-example)

Upload a Video
--------------

[](#upload-a-video)

To upload a video, you simply need to pass the **full** path to your video you wish to upload and specify your video information.

Here's an example:

```
$video = Laratube::upload($fullPathToVideo, [
    'title'       => 'My Awesome Video',
    'description' => 'You can also specify your video description here.',
    'tags'	      => ['foo', 'bar', 'baz'],
    'category_id' => 10
]);

return $video->getVideoId();
```

The above will return the ID of the uploaded video to YouTube. (*i.e dQw4w9WgXcQ*)

By default, video uploads are public. If you would like to change the privacy of the upload, you can do so by passing a third parameter to the upload method.

For example, the below will upload the video as `unlisted`.

```
$video = Laratube::upload($fullPathToVideo, $params, 'unlisted');
```

### Custom Thumbnail

[](#custom-thumbnail)

If you would like to set a custom thumbnail for for upload, you can use the `withThumbnail()` method via chaining.

```
$fullpathToImage = storage_path('app/public/thumbnail.jpg');

$video = Laratube::upload($fullPathToVideo, $params)->withThumbnail($fullpathToImage);

return $youtube->getThumbnailUrl();
```

**Please note, the maxiumum filesize for the thumbnail is 2MB**. Setting a thumbnail will not work if you attempt to use a thumbnail that exceeds this size.

Updating a Video
================

[](#updating-a-video)

To update a video, you simply need to pass the **videoId** of the video you wish to update and specify your video information.

Here's an example:

```
$video = Laratube::update($videoId, [
    'title'       => 'My Awesome Video',
    'description' => 'You can also specify your video description here.',
    'tags'	      => ['foo', 'bar', 'baz'],
    'category_id' => 10
], $privacy);

return $video->getVideoId();
```

Note: This request is explicit. Any params left out of the request will be removed.

Deleting a Video
================

[](#deleting-a-video)

If you would like to delete a video, which of course is uploaded to your authorized channel, you will also have the ability to delete it:

```
Laratube::delete($videoId);
```

When deleting a video, it will check if exists before attempting to delete.

Questions
=========

[](#questions)

Should you have any questions, please feel free to submit an issue.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d0f98ed5f47a5fe88315a6ce9950c74536a7fd2cc1f4994a92ed418175e943d1?d=identicon)[Betuulabs](/maintainers/Betuulabs)

---

Top Contributors

[![BetuuLabs](https://avatars.githubusercontent.com/u/38490851?v=4)](https://github.com/BetuuLabs "BetuuLabs (5 commits)")

### Embed Badge

![Health badge](/badges/betuulabs-laratube/health.svg)

```
[![Health](https://phpackages.com/badges/betuulabs-laratube/health.svg)](https://phpackages.com/packages/betuulabs-laratube)
```

###  Alternatives

[tailpress/tailpress

The Tailwind CSS powered WordPress boilerplate theme.

1.4k2.9k](/packages/tailpress-tailpress)[nerds-and-company/schematic

Craft setup and sync tool

13654.4k1](/packages/nerds-and-company-schematic)[mmikkel/cp-field-inspect

Inspect field handles and easily edit field and element source settings

29536.8k14](/packages/mmikkel-cp-field-inspect)[yii2mod/yii2-ion-slider

Ion.RangeSlider Widget for Yii 2

21138.3k](/packages/yii2mod-yii2-ion-slider)[bayfrontmedia/php-array-helpers

Helper class to provide useful array functions.

1413.4k23](/packages/bayfrontmedia-php-array-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
