I Can't install Laravel 4's package - class

I just started learn Laravel 4, i have problem when install laravel's package, in this case it is: http://packalyst.com/packages/package/greggilbert/recaptcha
I do all steps, but it always display: Class 'Greggilbert\Recaptcha\RecaptchaServiceProvider' not found
I think problem is i don't know where to put recaptcha-master.zip, root folder? or in Vendor folder? i don't know :(
Please help, thank you so much :(

First you need to add "greggilbert/recaptcha": "dev-master" to the require section of your composer.json file found in the Laravel root.
Once thats done you then need to install composer globally or download a copy of composer.phar and move it to your Laravel root.
Once either of those methods have been completed, you then need to run either composer update if you installed composer globally or php composer.phar update in order to install the new packages.
After, and only after composer has updated with the new dependencies you should then add the service providers and other configurations to Laravel.
Heres a link to the composer site. http://getcomposer.org/

Related

Enabling DHL Marketplace in Magento 2

How can I add DHL Market Place in my Magento 2 admin? Been searching on how to enable it but can't find any solution. Should I just copy the download file into the app folder? or do I need to go to the admin panel?
Note: Beginner here
Ok for those who will be encountering the same issue as I have here is the answer and I'm referring this to the answer that the developer gave me.
If you are running in PHP 7+ and want to install via VCS then below are the command you need to run and DON'T use installation that they provided in the README.md specially for version 0.10.0. It lacks the proper instruction on how to install it in Magento 2.3 using version 0.10.0 Below are the correct command needed to run and install DHL in your Magento project
composer config repositories.dhl-shipping-m2 vcs git#github.com:netresearch/dhl-module-shipping-m2.git <-- This is the important part to make it work
composer require dhl/module-shipping-m2:0.10.0
Magento2 follows a structure to add custom modules .. Their are two ways to add extensions in m2..
1 : Install it from the composer Eg: for DHL to install from composer
composer require dhl/module-shipping-m2:0.10.0
It will directly saved in vendor folder
2 : Manual installation , Download the extension and copy that into the magento root ie.. app/code/yourextension

Typo3 classic mode generate composer file

short question. I got a site in Typo3 8.7 it was created in Classic Mode.
I installed a lot of extensions ( Realurl and stuff).
Now i want to port that to composer mode.
Is there a way to generate a composer.json/.lock from my site and then bring it over to my composer typo3 installation and let it download everything?
There is a good list of steps you need to take for switching from classic to composer mode from Mathias Brodala.
https://stackoverflow.com/a/46450927/1375055
No, not to my knowledge. You'll have to kickstart your composer.json manually (or with the composer cli interface) and evolve it until you reach a similar combination of dependencies in your project.
There is no Automated way of dooing this but a quick hack would be
the following bash command do get a list of all packages names of the extensions
for f in $(ls typo3conf/ext); do echo "typo3-ter/$f"; done;

Using an NPM module from Ionic

I am using ionic 1.3.1 and I want to use the npm phone module here to validate phone numbers on the client side.
In looking around on how to use the npm module, I followed instructions in this SO post (last answer at the bottom) and copied the phone directory from npm_modules to www/lib. I then included the lib/phone/lib/index.js file in my index.html.
When I bring up the page with ionic serve I get the error "module not found".
I see solutions for using npm in Ionic v2 but am not ready to move to v2 yet. I also see some answers pointing towards using Browserify but I am trying to avoid having to use new tools if I don't need to - feels like there must be a simple way to use an npm module inside ionic.
Thanks for any pointers to help resolve.
Sanjay
Since I couldn't figure this out I just created an Angular service from the code in the index.js file for the npm phone module.

Install ZF2 modules on windows 7 by using composer.json

I have just started to explore zf2 and trying to install modules. have downloaded zip for ZfcAdmin and ZfcUser and added them manually but no luck. I think it can be installed by using composer.phar but how I have skeleton application running perfectly.
I know php composer.phar self-update / install but how to write composer.json is my question
You open the composer.json file with a text-editor of your choice. Then you'll be able to see the json formatted data, that will be passed to composer.phar
If you wish to add new modules, you'll see the require: {} block, to which you simply add the namespaces/modules you wish to include. For example extend your composer.json to something like this:
"minimum-stability": "alpha",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.*",
"zendframework/zend-developer-tools": "dev-master",
"doctrine/doctrine-orm-module": "0.*"
}
Seeing this i install both zend-developer-tools and zendframework from the zendframework Git-Repositories and additionally i install doctrine-orm-module from doctrine-repository.
A little catch: Some repositories / modules are under heavy development and there will be no stable version yet. Personally i run with the additional parameter "minimum-stability": "alpha", to tell composer to include all alpha repositories for downloading.
If you just need a single alpha-version, you'd much likely need to re-write the composer.json a couple of times.
Last but not least, php composer.phar update will do the trick and you'll always be up to date with the repositories.
Some additional notes for windows users
Sometimes Write-Permissions may be missing from command line. You can change this by running the command line with administrator privileges.
If the PHP Command is not found, you may need to add the PATH to the PHP-Executable into your Environment-Variable PATH
I wrote a detailed blog-post on how to keep ZF2 running via command line with git for windows 7 myself, so far this has covered most problems, you may want to check out my Blogpost
Hope this gets you running ;)

Size of package Zend Framework installed through Composer

I was just wondering why the package "zendframework/zendframework1" on Composer was so big:
[root#server-VM-001:vendor #] du -sh zendframework/
558M zendframework/
Can someone explain?
By the way, is it possible to get the Zend Framework minimal package through Composer?
If you install dev-master or another dev- version, composer by default installs it "from source" which means it does a git clone. Given ZF is large and has a long history, the complete repository is quite huge.
The solution for now is to just install tagged releases which are downloaded as dist (zip archives in composer lingo). In the not-so-distant future there should also be a --prefer-dist flag you can pass to composer install that will force dists even for dev packages.