0

i have edited psr-4 on composer.json

"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "Marka\\Urun\\": "vendor/Marka/Urun/src/",
        "App\\": "app/"

    },
    "files": [
        "vendor/Marka/Urun/src/helpers.php"
    ]
},

I want to change file(routes.php, helpers.php and Models,Views,Controllers) pathes to : Vendor/Marka/Urun/

enter image description here

How can I do it ?

Kerem Çakır
  • 401
  • 2
  • 7
  • 19
  • Two things. **1.** Please don't link to pictures of source code, just include the code in your question. **2.** Please explain why you want that, because what you've described so far makes little sense without context. – Bogdan Mar 26 '16 at 13:15
  • https://stackoverflow.com/a/54014207/2005680 – Yevgeniy Afanasyev Jan 02 '19 at 22:53

1 Answers1

0

You're trying to get some modular structure if I get it right.

If so, instead of trying to set a different namespacing from composer for each of your modules under vendor directory; i think you may try to use something like http://sky.pingpong-labs.com/docs/2.0/modules

Otherwise as you may know, by using PSR-4 and directory structure, if you coded your files properly all necessary files would be loaded automatically as you named (namespaced) them.

By the way, just in case you didn't know you may also need a ServiceProvider to boot everything up for Laravel on your package.

I also suggest you to read https://laravel.com/docs/5.2/packages if you need any help about development structure/functionality.

jnbn
  • 70
  • 3
  • 7