The only way I can make a standard l4 command work is by commenting out the Artisan::add(new SeedCommand);
Oh needs a big A ! That's the facade :
Artisan::add(new SeedCommand);
ok well with a Big "A" I know get:
vince@vince-XPS-8300 /var/www/auburntree $ Artisan::add(new SeedCommand);
bash: syntax error near unexpected token `new'
in app/start/artisan.php
I have a big A in app/start/artisan.php I have had it all along:
Artisan::add(new SeedCommand);
app/commands is the normal place to put command class, I dont understand why it doesn't find it...
here is my directory structure - I think I put it in the right place:
It's ok, did you try a dumpautoload ?
Interesting - I ran dump-autoload and I got:
Generating autoload files
[RuntimeException]
Could not scan for classes inside "app/commands" which does not appear to be a file nor a folder
Ok - Maybe I have it - I have not included it on the PSR-4
is that it ?
Because you have "Commands" and not "commands" in your directories
Ok - autoload ran without error, however when I run the command in a terminal I still get:
vince@vince-XPS-8300 ~ $ Artisan::add(new SeedCommand);
bash: syntax error near unexpected token `new'
You dont have to run this command in a terminal. Just now check with php artisan list
vince@vince-XPS-8300 ~ $ php artisan list
Could not open input file: artisan
artisan doesn't work ?
yes - php artisan works so long as I comment out the: Artisan::add(new SeedCommand);
If I do not comment it out then the whole of the L4 code appears in the terminal
That is significant
artisan.php is a casual php file with <?php ?
I don't understand what you mean by that last statement. Yes, artisan.php has php tags
I need to go out in a couple of minutes, my wife is giving me shit. And it is 12.30 AM for you .. so maybe a fresh head will solve the problem ? I feel we are very very close.
Yes sleeping time for me ^^
salut - et Merci bien ! :o)
Haha you two, 4 pages :D
bestmomo, make a package!
A package sounds great. Bestmomo has done a great job of trying to get it to work and I have been happy to be his first guinea pig ! :o)
A package for one class :)
Na, have stuff to manage migrations/seeds easier. Maybe a package that is like Jeffrey's generators but allows you to get all the tables into seed files and other cool stuff :P
Anyway @vincej you should make this command work ;)
@bestmomo Many thanks for all your efforts in trying to get this to work ! It is much appreciated ! Did you ever get it working on L4.2 ?
I have not yet covered Jeffrey's lessons on building commands and so until I have covered that I will have to leave this project dormant for a while.
Yes @vincej, I tested it on fresh L4.2 today, and all is working fine
Brilliant Thanks ! Did you make any changes since yesterday ??
No, only code that is on this post.
Please or to participate in this conversation.