[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "make:factory" is not defined.
php artisan make:factory PostFactory
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "make:factory" is not defined.
I think you have old versions of PHP and / or Laravel. Try upgrading with the following command:
$ composer update
Related
I run php artisan tinker but it didn't work it just show a message like this
c:\xampp\htdocs\app_tpa>php artisan tinker
[ErrorException]
rmdir(C:\Users\KIMUNG~1\AppData\Local\Temp\php-xdg-runtime-dir-fallback-): Directory not empty
I tried to run composer require laravel/tinker, but it doesn't fix my problem
This issue is now resolved as per these github issues:
laravel/tinker#29
bobthecow/psysh#430
The proper solution now is to do composer update
I have a problem with install VentureCraft/revisionable in Laravel.
When I trying use this command:
php artisan migrate --package=venturecraft/revisionable
Artisan returned error:
[Symfony\Component\Console\Exception\RuntimeException] The "--package"
does not exist.
I using Laravel version 5.2
Simply, you can migrate by:
php artisan migrate --path=vendor/venturecraft/revisionable/src/migrations
The --package syntax was only available in Laravel 4. It seems like this package has old documentation based off that release.
You'll need to go into the vendor/venturecraft/revisionable/migrations folder and copy the migration and insert it in your database/migrations folder.
Then run the command php artisan migrate.
in Laravel 4.2 by using JeffreyWay/Laravel-4-Generators we could use
php artisan generate:view my-view
to create a view named my-view.blade.php.
Now in Laravel 5.1 what we should use to generate a view?
php artisan make:???
According to package's developer, you need to use L5 version instead. Now you are able to run php artisan generate:view.
As a reminder, these commands are not native of laravel artisan console.
In laravel 5.1 no artisan command for make/generate view.
You can install sven/artisan-view package to make view from CMD, to install package write this command:
composer require sven/artisan-view --dev
After installing it, you can make a single view or folder with all views that contain {index-create-update-show}
To make a single file we using this command:
php artisan make:view Name_of_view
For example
php artisan make:view index
To make a folder that contain all resources index - create - update - show write name of folder that contain all this files for example:
php artisan make:view Name_of_Folder -r
For example:
php artisan make:view blog -r
-r is a shorthand for --resource you can write full name or shorthand to make resource.
For more view docs
I'm trying to create middleware in Laravel 4.2 when I run
php artisan make:middleware OldMiddleware
it returns 'there are no commands defined in the 'make' namespace'
however migrate command works
when I run
php artisan list
it shows me the list of command but there is no 'make' command indeed
?
I got this command : php artisan make:middleware OldMiddleware from official laravel website -
make:middleware artisan command was added in Laravel 5.0. It seems that you're running some older version of Laravel. If you want to use this command, upgrade to Laravel 5.0.
I made one change in my composer.json including Facebook SDK package (http://packagist.org/packages/facebook/php-sdk).
So during the composer update I got this error
$ php artisan optimize
PHP Fatal error: Interface 'SessionHandlerInterface' not found in
/Users/Leandro/www/bootstrap/compiled.php on line 2644
After this, I can't run artisan or composer commands. Always get the same error.
I tried to remove Facebook SDK from composer json but not works.
Some help? Using --no-scripts the command works fine:
composer update --no-scripts
try to do this :
composer dump-autload
composer update
i think this may or may not solve it for you ..
you may need to delete the .json file which can be found on app\storage\meta, not 100% sure but it might work ..
Check out this troubleshooting checklist, sounds like you need to do a php artisan dump-autoload though.