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

agahi's avatar
Level 1

Installing a package manually. Class not found

I have a site on an hosting account without SSH access so I decided to install a package manually. This package is used for Form creation. This is what I have done. First of all my Laravel version is:

const VERSION = '5.3.28';

I downloaded LaravelColletive/Html form this address: https://github.com/LaravelCollective/html, unzipped it and uploaded it to vendor folder. This is the file structure of the package:

vendor
--laravelcollective
----html

Put this line inside config/app.php

    'providers' => [
....
  Collective\Html\HtmlServiceProvider::class,
....
]

And also these lines


    'aliases' => [
          'Form' => Collective\Html\FormFacade::class,
          'Html' => Collective\Html\HtmlFacade::class,  
]

Also this line in composer.json

    "require": {

        "laravelcollective/html": "^5.3.*",     
       

Upon refreshing the web page I get:

Class 'Collective\Html\HtmlServiceProvider' not found

Any idea what I am missing here?

0 likes
5 replies
zachleigh's avatar

Why not just install it with composer? Try dumpautoload:

composer dumpautoload
agahi's avatar
Level 1

Doesn't composer need SSH access? I usually use Putty but for this domain I don't have SSH access.

zachleigh's avatar

I would just build your complete app locally and upload the whole thing, packages and all. That way you won't have to deal with trying to build things remotely.

agahi's avatar
Level 1

So there is no way I do it manually this way? Does it have to be with composer?

zachleigh's avatar
Level 47

The problem is that if you do it manually and have no way to ssh into your server, you cannot force composer to reload the class cache. I believe this is why you're getting the error you are getting. So I'm thinking you have three options:

  1. Build all your dependencies locally and upload the entire project.
  2. Change hosts. You can get a host that allows ssh for a very good price these days.
  3. Don't use the LaravelCollective form package. It's pretty pointless. Why should you have to go through all this just to open an HTML form?
1 like

Please or to participate in this conversation.