propelorm / PropelLaravel

Propel 2 integration for Laravel framework
MIT License
30 stars 21 forks source link

Default app_path in setting is not same after built model #21

Open gtokung opened 7 years ago

gtokung commented 7 years ago

Laravel 5.4 with propelLaravel last version before built : in configuration the default path is 'phpDir' => app_path('Models'),

but after i built the model it generate file and write namespace like this-> namespace App\Modules; it's bug that i found.

pls solved this issue or tell me how to fixed

Thank you.

SCIF commented 7 years ago

@gtokung , write down path for newely generated model related to root of your application, please. Models obviously uses namespaces so I don't understand what's your concern. Provide actual and expected state and I will can help you.

gtokung commented 7 years ago

OK. the problem is when i set config phpDir in config/propel.php like this ('phpDir' => app_path('Models')) and then i build with command => php artisan propel:model:build it's generate new folder "Models" but the file inside this folder like Users.php it's use namespace like => "namespace App\Modules;"

it should be "namespace App\Models;", Right?

Thank you.

SCIF commented 7 years ago

@gtokung , actually namespace should be specified in schema.xml: http://propelorm.org/documentation/reference/schema.html#database-element If you are running initial installation, then init command will try to detect your basic namespace from composer.json file.

gtokung commented 7 years ago

Thank You.