PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, January 4, 2022

[FIXED] Installing github package into Laravel project using composer

 January 04, 2022     composer-php, laravel, laravel-5.2, php     No comments   

Issue

I need to install custom packages from github url using composer. My Laravel 5.2 based project is clean and fresh install.

The github project I need is: https://github.com/cmcdonaldca/ohShopify.php

I am still new to Laravel and composer and need help with clear steps as much as possible.

Any help?


Solution

Composer uses packages from the repository https://packagist.org/. You can't really just use github packages directly from github.

You have 2 options here.

  1. Use a package available on https://packagist.org/ to integrate with the shopify API. I've had a look on packagist and found rocket-code/shopify and phpish/shopify. To add them to your laravel project, in the folder that contains the composer.json file use the following command:

    composer require rocket-code/shopify

  2. You could create your own packagist package using the git repository. so you'll clone the repo and then create your own packagist account. So sign up, get a packagist account, upload the file and then require it in your laravel project.

I suggest that you use an existing composer package, as it takes away the responsibility of managing your own package.



Answered By - vsharper
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing