Hi Ashley. That's what I thought/tried. Which is why I can't understand what i'm screwing up, to generate the err. My steps download the github code/repos into the test dir --- https://github.com/jijunair/laravel-referral /var/www/html/jijunair CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE README.md SECURITY.md composer.json composer.lock config database images routes src tests vendor and trying cd jijunair/ sudo -u www-data composer require jijunair/laravel-referral Root package 'jijunair/laravel-referral' cannot require itself in its composer.json per the github repos/page-- Installation:: You can install the package via Composer by running the following command: composer require jijunair/laravel-referral thoughts/comment? thanks.. ps. I see this in a number of test sites... so I'm missing something. On Tue, Jul 30, 2024 at 9:24 PM Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> wrote:On 31 July 2024 02:07:17 BST, bruce <badouglas@xxxxxxxxx> wrote:Hi. Is the list ok to post basic laravel questions? Or only straight php? I'm doing some basic research on laravel, and other tech/stacks. For laravel, assume I download a test app from github, and install it in: /var/www/html/asciisd I do a composer install The "install/setup" says I should do acomposer require asciisd/referrals-laravelas well. Should this be done while within the " /var/www/html/asciisd" or in the parent dir " /var/www/html" doing this from the inner dir, gets an err Root package 'asciisd/referrals-laravel' cannot require itself in its composer.json I'm currently looking over github code samples, as well as numerous vids.. thanksIt should be done in the same directory as the composer.json file. If you think about it, it makes sense, as that's the config for your composer install.
Couple of things, please reply to the list, not directly back to
me so that everyone benefits, also try not to top post, but leave
replies at the bottom, as per the rules of this list.
Now, onto your issue. I think what you may be doing is cloning this repository down separately, and then trying to require it within itself. The instructions in that repo could be clearer, but if you look at the first line in the readme installation instructions, it mentions that this is a package, and in Laravel parlance, that's something you include into an already existing Laravel website. Think of it a bit like a library.
So, from within your separate Laravel website that you have set up, run the `composer require` line, which will install this package, and then you can use it to generate your referral codes.
Thanks,
Ash
Ashley Sheridan https://www.ashleysheridan.co.uk