samedi 21 décembre 2019

Manually installing/integrating a composer package

I tried installing this composer module on my Laravel app https://github.com/alihesari/laravel-social-auto-posting but im facing some issues. Im avoiding composer since it requires me to update my Laravel version which will break things (im runnin under 5.1.9).

Steps that I took so far:

1) wget https://github.com/alihesari/laravel-social-auto-posting/archive/master.zip - inside htdocs directory

2) unzipped master.zip and renamed folders. Moved folders inside /vendor/ folder under this structure: /vendor/toolkito/larasap/ - This folder contains the src subfolder as shown in the repo.

3) Added this reference in \vendor\composer\autoload_namespaces.php and in \vendor\composer\autoload_psr4.php: 'Toolkito\\Larasap' => array($vendorDir . '/toolkito/larasap/src'),

4) Configured my secret keys in the config file, for the proper social media connection

5) Added use Toolkito\Larasap\SendTo; in the main controller, as per repo's instructions

6) Added SendTo::Twitter('Hello, I\'m testing Laravel social auto posting'); to a function that I use and ended up in this error:

FatalThrowableError in HomeController.php line 47:
Fatal error: Class 'Toolkito\Larasap\SendTo' not found

I also tried use Vendor\Toolkito\Larasap\SendTo; in step 5, and ended up with the same error message.

Any suggestions please?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire