Closed fwerner13 closed 10 years ago
mydomain.local/gii/ - slash at the end
@ribris is right. You need to add /
(slash) at the end.
Closed! Thanx!
when i use gii for crud generator for "Barang" and i try to open backend/barang/default/index
Not Found (#404) Unable to resolve the request "barang/default/index".
barang/default/index/
with /
at the end.
same sir, 2 error log
5 19:45:09.172 error yii\web\HttpException:404 exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "barang/default/index".' in C:\xampp\htdocs\mantap\vendor\yiisoft\yii2\base\Module.php:461 Stack trace:
Next exception 'yii\web\NotFoundHttpException' with message 'Unable to resolve the request "barang/default/index".' in C:\xampp\htdocs\mantap\vendor\yiisoft\yii2\web\Application.php:95 Stack trace:
and ::::
29 19:45:09.526 error yii\i18n\PhpMessageSource::loadMessages The message file for category 'vova07/themes/admin' does not exist: C:\xampp\htdocs\mantap\vendor/vova07/yii2-start-themes/admin/messages/en-US/vova07/themes/admin.php Fallback file does not exist as well: C:\xampp\htdocs\mantap\vendor/vova07/yii2-start-themes/admin/messages/en/vova07/themes/admin.php C:\xampp\htdocs\mantap\vendor\vova07\yii2-start-themes\admin\views\layouts\main.php (34)
I'm sorry, I was meaning /backend/barang/default/index/
. And are you added the rules for your own modules in URL rules
section of ***end/config/main.php
? Check this related issue please.
i already put '<_c>/<_a>' => '<_c>/<_a>', '<_m>/<_c>/<_a>' => '<_m>/<_c>/<_a>'
but it still not working for me ..
Can you give more info.
In with directory are the module's files? Barang
is the module name, or this is the model name?
sorry i mean barang is the model name sir
Ok then what is the controller
or module
name that you want to access? When you generate the CRUD, you generate the controller or the module? Thanks!
i generate app\controllers\BarangController in the controllers so i wrong sir?
If BarangController
is in the namespace app
this is the problem.
In my application, like in advanced
template are 3 global namespaces backend
, common
and frontend
. So you must use one of 2 for controllers: backend
or frontend
. In your case you just need to change namespace of your BarangController
to frontend\controllers
or to backend\controllers
depends on your needs. After, you'll can access your controller by regulary route: ****/barang/index/
where index
is the name of controller action.
thanks for your help sir, but i try to use modules for crud and it's work for me :)
First: this is a great application, exactly what I was looking for.
But somehow I can't access the gii module (on a fresh install).
When I try to access it via mydomain.local/gii I get a 404 error.
Am I missing something?