Laravel migration issue - laravel-4

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?

Related

Php artisan serve in laravel

I am new in laravel development. I am using latest version 9 of laravel, when I write php artisan serve in git bash or in VS code terminal after sometime it gives an error. I attached a screenshot of an error.
run php artisan optimize command
composer install
composer update
php artisan optimize:clear
This will clear all the cache of the application

laravel telescope nothing to migrate

i have a laravel 6 app that i want to install the telescope in that i did all the commands like composer update and composer dump-autoload and then i install the telescope every thing is going fine and when i run php artisan telescope:install i get the message below :
Publishing Telescope Service Provider...
Publishing Telescope Assets...
Publishing Telescope Configuration...
Telescope scaffolding installed successfully.
but it wont generate the config file and migration so when i run php artisan migrate i get this message :
nothing to migrate
in your command
php artisan vendor:publish --tag=telescope-migrations
then edit you your env file
TELESCOPE_ENABLED=true
after this run
php artisan optimize
Finally
php artisan migrate
You must publish it first using the below command:
php artisan vendor:publish --tag=telescope-migrations
Then you will get the default migrations and also the config/telescope.php file
After installing the telescope in my project and exporting the default migration I got this error.
λ php artisan vendor:publish --tag=telescope-migrations
Unable to locate publishable resources.
Publishing complete.
How I solve this issue
If you're getting this issue open telescope.php file which is inside of your config directory.
and then set the value of this TELESCOPE_ENABLED to true
'enabled' => env('TELESCOPE_ENABLED', true),
Because in my case the value of TELESCOPE_ENABLED this was false
Then again run this command php artisan vendor:publish --tag=telescope-migrations.
I hope it will work :)
I had accidentally ran php artisan optimize in my local environment which was causing this issue. To fix it, I had to run php artisan optimize:clear, then uninstall laravel/telescope, remove any references to it, and install it again from scratch. It then recognised the migrations and the published assets.
I did this
composer remove laravel/telescope
Then change your .env file
TELESCOPE_ENABLED=true
Then install back again it worked!

PHP Artisan Tinker not working with Laravel 5.5.16

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

Laravel VentureCraft/revisionable error migration table

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.

Command php artisan migrate not defined - Laravel deployment

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.

Resources