Closed sujit-baniya closed 4 years ago
Hi,
you have missed the step to actually generate the migration (https://spiral.dev/docs/cycle-commands).
Try running
$ php app.php cycle:migrate
It will generate the migration for your entity in app/migrations
and you can run it using php app.php migrate
.
I apologize for the hard learning curve, we learning how to simplify docs as we go.
No worries at all! :) I think it would be good to provide more error information
I got this error:
[Cycle\ORM\Exception\ORMException]
Unable to resolve role of `App\Database\Account`
in /Users/sujit/Sites/labs/php/spiral-demo/vendor/cycle/orm/src/ORM.php:112
And I don't know how to proceed ahead. It would be helpful to me if there was already resolve issue on github :)
But it's working now... I find this framework promising. I just need to get my hands dirty for my next project with this framework.
If possible can you suggest me how to deploy this framework to production with roadrunner
Now getting this error when trying to access localhost:8080
from browser:
Spiral \ Encrypter \ Exception \ EncrypterException
Encoding::hexToBin() input is not a hex string.
Previous exceptions
Encoding::hexToBin() input is not a hex string. (0)
Weird, did you installed the application via composer create/application
?
Check https://spiral.dev/docs/security-encrypter#application-key sounds like you have no encryption key.
It was working with ENCRYPTER_KEY={encrypter-key}
previously
I assume you set some cookies since the app configured to encrypt your cookies automatically. The error won't fire until the component used.
I did added Entity and Commands and ran some commands : cycle:migrate
no other changes..
I think I found the issue but don't know how to resolve it.
Issue: I ran https://github.com/avto-dev/roadrunner-laravel on same port: 8080 then stopped it and ran the spiral framework... Then I encountered the issue again.
The env var was:
ENCRYPTER_KEY={encrypter-key}
on spiral
try
$ php app.php encrypt:key -m .env
for spiral application.
With above command it's working
I created command using following command:
php app.php create:command seed\account seed:account
then used following command to create entity
php app.php create:entity account -f id:primary name:string -e
Then I ran
php app.php configure
Then update AccountCommand as:
When I tried to run
php app.php seed:account
, I'm getting following error:I'm getting above error on freshly installed https://github.com/spiral/demo
Why am I getting this error? Isn't there any resource to learn the framework easily?
Getting hard to understand the errors