Command php artisan migrate not defined - Laravel deployment - laravel

I'm trying to deploy a locally working Laravel 4 project on a Strato server.
Locally I can execute the command php artisan migrate, but when I'm trying to execute this command on the server using PuTTY command line, it throws the following exception:
[InvalidArgumentException] Command "migrate" is not defined.
These have been my deployment steps:
Install basic laravel application locally, using composer (path variable)
Upload all files to the server. Now the warning, that a database column couldn't be found is visible. So I want to migrate the database.
Run the command php artisan migrate
When I run the command php artisan list there are a few methods listed like tail and workbench, but not the commands that I need.
PHP 5.5 and MCrypt are installed on the server.
Do I have to extend the artisan installation?
Update:
The problem seems to be the following:
Warning: Composer should be invoked via the CLI version of PHP, not
the cgi-fcgi SAPI
Futhermore there is this warning:
Warning: The lock file is not up to date with the latest changes in
composer.json. You may be getting outdated dependencies. Run update to
update them.
Running update doesn't work, because it tries to run a mising artisan argument.

Related

Laravel throws Facade root error on key:generate in pipeline

I just tried to push a commit on a project. When this happens, my GitLab CI picks it up and tries to install the projects dependencies via Composer in it's Docker container. After installing the dependencies, it'll copy the .env.example file to .env and run php artisan key:generate
However, when it does this, my pipeline crashes on the following:
$ php artisan key:generate
In Facade.php line 258:
A facade root has not been set.
I've tried to set the key locally in various ways, removed composer depenencies and reinstalled them, but in none of those scenarios, I encounter this error in my local environment.
Is this a known bug in Laravel? (6.18.0)
Thanks.

Php artisan migrate in command prompt is bringing errors when I want to migrate Laravel project to my second computer

When I tried this code in command promt in my directory of laravel project: php artisan migrate: I always get this error warnig what is the reason and how I an fix it: PHP Parse error: syntax error, unexpected ':' in C:\xampp\htdocs\blog\vendor\composer\autoload_real.php on line 66.
You most likely got different PHP version installed on other machine and that version is too old. Compare versions with php --version and upgrade.

How to configure older project in Laravel

I want to run my older project after installing a new OS.
I have cloned that project in htdocs, but it is showing a 404 error in the browser.
I have run these commands:
composer install
composer update --no-script
php artisan key: generate
php artisan migrate

Laravel migration issue

I have an issue with the composer for creating migrations.
I just installed Laravel 4.2 via composer.
But i want to make migrations for my DB via composer, so i typed this command below:
php artisan migrate:make create_user_table
But then i get the error:
(I've tried it again to install Laravel 4.2, but i still get this error.)
Could not open input file: artisan
How can i fix this?

Cannot install Laravel 4 package

I'm trying to install the following package:
Laravel 4 Auth token
But when I try to run the migration I got the following error
there is nothing to migrate
(while there should be). When I go to the vendor folder, the package folder exists, but it is empty. Furthermore, I've successfully published the config of this package.Could someone please explain to me why can't I run the migration?
You need to run the following command
php artisan migrate --package=tappleby/laravel-auth-token
to migrate for your package (tappleby/laravel-auth-token). When you had run
php artisan migrate
you got the message there is nothing to migrate is because you are running your own migration file. So, It's say nothing to migrate! For more about migration please read on Laravel Documentation.

Resources