Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

samia_olabi's avatar

install php package inside laravel framework

Hi , i'm trying to install a php package into laravel website how can integrate this package with laravel ? what I need to do ? any help please ?

https://github.com/norkunas/youtube-dl-php

0 likes
7 replies
Cronix's avatar

Do the instructions in that repo not help? Have you installed it via composer?

samia_olabi's avatar

I didnt try because this is not Laravel package

and there is no Service Provider or an Alias in it

Cronix's avatar
Cronix
Best Answer
Level 67

It still installs the same way via composer so the classes will be autoloaded. You can make your own aliases, or just use it manually like the docs show by using use statements for the classes, or create a service provider.

https://laravel.com/docs/5.6/providers

1 like
Cronix's avatar

The only thing you wouldn't have to do in the "Download video" example after you install via composer is add require __DIR__ . '/vendor/autoload.php';, as laravel already does that.

samia_olabi's avatar

@Cronix thank you so so mutch this is solved my problem , I didnt know that this is gonna work . I thought I need to do some other stuff before thanks again

Please or to participate in this conversation.