morning, I want to show gallery album picture combined with jQuery and CakePHP.
-
while I’m upload picture used plugin
josegonzalez/cakephp-uploadand follow step by step config in
http://josediazgonzalez.com/2015/12/05/uploading-files-and-images/the result is success
-
the next after success upload image, I want to show gallery picture, look beatiful use album jQuery gallery. After I have search via http://packagist.org I want used plugin and install them
composer require hugodias/cakegallery dev-masterthe trouble on terminal cmd is shown below
Installation failed, reverting ./composer.json to its original contents [RuntimeException] unable to get primary namespace for package hugodias/cakegallery. ensure you hava added proper 'autoload' section to your plugin's config as stated in README on https://github.com/cakephp/plugin-installerguide reference in https://github.com/cakephp/plugin-installer that doesn’t I’m understand
For the installer to work properly ensure that your plugin’s composer config file has a proper autoload section. Assuming your plugin’s namespace is “MyPlugin” the autoload section would be like:
"autoload": {
"psr-4": {
"MyPlugin\\": "src"
}
}
Not strictly necessary for the working of the installer but ideally you would also have an “autoload-dev” section for loading test files:
"autoload": {
"psr-4": {
"MyPlugin\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"MyPlugin\\Test\\": "tests",
"Cake\\Test\\" : "vendor/cakephp/cakephp/test"
}
}
If your top level namespace is a vendor name then your namespace to path mapping would be like:
"autoload": {
"psr-4": {
"MyVendor\\MyPlugin\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"MyVendor\\MyPlugin\\Test\\": "tests",
"Cake\\Test\\" : "vendor/cakephp/cakephp/test"
}
}
here below my config in
composer.json
"autoload": {
"psr-4": {
"App\\": "src/",
"Nasa\\": "./plugins/Nasa/src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Test\\": "tests/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/",
"Nasa\\Test\\": "./plugins/Nasa/tests/"
}
},
- where the part of my composer.json that must to modified.
thanx for help and any best ideas:pray: