Interface 'Throwable' not found when I migrate the table Laravel - php

I want to migrate table in Laravel Framework.
But when I migrate the table the following bug appears.
artisan migrate
I have tried all solutions in stackoverflow, but anything doesn't work.
In .env file, I have set all the values correctly. I checked that many times.
I also checked php version and composer version.
And added "psr-0" to composer.json and tried composer dump-autoload.
I did all ways which I can do.
If anyone have met this bug before, then Please tell me.

Related

Laravel: Cannot generate migration file with make:migration command

I've got an ongoing project and migrations were working fine. But I don't know if something has changed, now php artisan make:migration my_migration_name is not generating a migration file and not showing any errors as well.
I've tried running it with -v verbosity flag but nothing is printed on terminal. My directory permissions seem to be fine;
I've also tried running it with sudo but I got this error message;
I've updated composer and tried to remove laravel and reinstall laravel/framework '5.1'. But nothing seem to help.:(
If someone has faced this kind of issue and managed to resolve it, help would be really appreciated. Any suggestion how to resolve this issue?
I've got it working somehow. It was really weird behavior and tried different solutions to get it working. I thought I should list down steps I follow to get it working, for someone who may get into this type of behavior.
Short and quick solution might be to clear all your cached data and application configs.
php artisan cache:clear # clear all cached files.
php artisan config:clear # clear application config cache
composer dump-autoload # reload all autoload classes
And quit the "TERMINAL" and reopen it, hope it should be working now.
If it still don't work then try following options and repeat above mentioned part;
Re-install your laravel/framework using composer. I found it while searching for solution
Check your directory permissions, see if you have write permissions.
Hope! It may help someone.

Laravel database migration methods not working after deleting a migration file

I am just beginning to learn laravel and so I am constantly dealing with migration methods right now. Previously, I have deleted a migration file ShippedViaToPurchaseOrders and after that I cannot perform php artisan migrate:reset/rollback anymore. What is the problem with this? Please help. Please take a look with the error below. Thank you so much.
These files are loaded using composer, it still thinks the file is there.
Try running the composer dump-autoload command before running migrations to recreate the autoload file and let composer know the file is no longer there.
Update:
The Laravel migration tool creates a table migrations in your database to know what migrations have been executed. In this table, remove the row corresponding to the removed migration.
Because the row is still there, Laravel will keep trying to run the rollback migration corresponding to that row.

laravel command not found while using laravel command

I've recently installed composer and also installed laravel installer from composer from the commmand line just like they said in laravel documentation.
But when I used the laravel command on the command line, it show error:
sh.exe": laravel: command not found
I also added environment variable in the path variable.
~/.composer/vendor/bin
But still the same error occurs while using the laravel command.
I'm a laravel newbie and I'm stuck in laravel installation.I've searched lot of times but still could not get the solution. I've read lot of users' questions with the same problem and used their solutions but still could not fix this.
Your path /c/xampp/php:~/.composer/vendor/bin is definitly wrong. Either you have to fix it (should be something like C:/{path_to_your_composer_directory}) or you can simply use composer create-project laravel/laravel --prefer-dist to install a new laravel project.
I would go with the 2nd option, because you don't have to configure something else.
On windows system, please remove . from path (just before .Composer)

Laravel setup project file fails

I've searched many answers to this problem, and a alternative solution to this project to still get what I try to achieve, but I want to know why it is not working the 'regular' way, and if it is possible to fix it somehow. I checked out this post where I found my alternative solution.
I installed laravel and I'm trying to create a project with laravel. However, when I run this command
composer create-project laravel/laravel cms
I get the following error: [InvalidArgumentException] - Composer could not find the config file
I followed all installation settings via a tutorial, created the composer enviroment variable, so those settings should be correct. Does somebody know why this is not working and how I might be able to fix this?
Edit: To clarify, as Joe commented, composer commands do work.
first, run the following command:
composer global require "laravel/installer=~1.1"
then, add ~/.composer/vendor/bin to your PATH. this way your system knows where the laravel installer is.
When this is done, you can simple use the following command to make a new project:
composer create-project laravel/laravel --prefer-dist
I had this problem myself since i was used to use composer to init a laravel project. However, after setting up this installer, i honestly love it. It has a bunch of neat options you can use ;-)
For more info, look here

Laravel migrations table not found

I'm trying to recover a project after a failed HDD. Lost the mysql information, so just have the project code.
I hoped to be able to put my database back together by using artisan migrate, but the error message tells me:
database.migrations doesn't exist
Is there actually a way I can use my Laravel code files and the command line to rebuilt my database like this?
Thanks for the help.
The command I needed to run was:
php artisan migrate:install
(I actually had more problems than this because the mysql install was messed up to. I don't know if simply php artisan migrate on its own would have implied :install but I'm adding it as an answer anyway should anyone have similar issues)

Categories