laravel 5.3 composer update error related with ide-helper - laravel

post-update-cmd: Illuminate\Foundation\ComposerScripts::postUpdate
post-update-cmd: php artisan ide-helper:generate
Executing command (CWD): php artisan ide-helper:generate
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Database\Connection::resolverFor()
Script php artisan ide-helper:generate handling the post-update-cmd event returned with error code 1

Try Using this command in cmd for faster composer install or update
// unix
php -m | grep xdebug
// windows
php -m | findstr xdebug
composer install --prefer-dist -vvv --profile
composer update --prefer-dist -vvv --profile

Related

execute laravel tests in docker fails

I have the following bash script for Laravel gitlab CI deployment
docker-compose -p project exec php8 bash -c '
composer install --working-dir="dashboard" &&
wp acorn config:clear --allow-root &&
wp acorn view:clear --allow-root &&
wp acorn optimize:clear --allow-root &&
wp rewrite flush --allow-root &&
php dashboard/artisan migrate &&
php dashboard/artisan optimize:clear &&
php vendor/phpunit/phpunit/phpunit --testsuite=Feature'
but the test are not executed because of the following error Could not open input file: vendor/phpunit/phpunit/phpunit if I ls the directory everything seems to be on the right place. How to debug this issue

how to fix " PHP Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found "?

when i run "php artisan jetstream:install livewire" I get this error :
PHP Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in H:\xampp\htdocs\tadavom123\bootstrap\app.php:14
i try to fix it with this codes but not working :
composer update
php artisan clear-compiled
composer dump-autoload
composer update --no-scripts
my composer version is : 2
php version : 7.3.10
laravel version: 8
in my case, you have to make sure that you write that code in folder that you want to run. In other hand, you need have a library php5-curl installed in your system, do this:
sudo apt-get install php7.3-curl
this curl have to be same with your php version. good luck.

Script closes after specific line, 'composer install'

I'm working on a script to start the laravel project from a github repo.
start cmd /c "mysqld" mysqld --log_syslog=0 --console
cd ./html/BackendAPI/
composer install --no-interaction
php artisan key:generate --no-interaction
php artisan migrate:fresh --seed --no-interaction
But the console closes after the composer install.
Any idea how to do it?
Use call to run composer install command
Like below
start cmd /c "mysqld" mysqld --log_syslog=0 --console
cd ./html/BackendAPI/
call composer install --no-interaction
php artisan key:generate --no-interaction
php artisan migrate:fresh --seed --no-interaction

Laravel Route is not working on live server

I am using laravel forge to deploy the application. The form submission on the local server works fine. It finds the right route declared in the route file. But it does not work on the live server. On live server when I hit submit button I got "Whoops, looks like something went wrong." message.
What could be the reasons? I will highly appreciate your help. Thanks in advance.
Here are the routes declared:
Route::get('/training/seo/outreach/brochure','BrochureDownloadController#index');
Route::post('/training/seo/outreach/brochure','BrochureDownloadController#store');
Here is the code on form
<form class="js-validate" method="post" id="brochure_download" name="brochure_download" action="{{ action('BrochureDownloadController#store')}}">
{{ csrf_field()}}
Deploy Script ( On forge)
cd /home/forge/www.xponent.com.bd
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
composer dump-autoload
php artisan cache:clear
echo "" | sudo -S service php7.2-fpm reloadif [ -f artisan ]
then
php artisan migrate --force
fi
Update your script
Add php artisan config:cache
cd /home/forge/www.xponent.com.bd
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
composer dump-autoload
php artisan cache:clear
php artisan config:cache
echo "" | sudo -S service php7.2-fpm reloadif [ -f artisan ]
then
php artisan migrate --force
fi
Please run below command:
php artisan config:cache
php artisan cache:clear
php artisan view:clear
php artisan route:clear

Laravel 5.4 - error when vendor:publish executed command

I just installed Laravel 5.4.* and I have error when I execute this command:
php artisan vendor:publish
vagrant#homestead:~/projects/xxxx_com$ php artisan vendor:publish
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'League\Flysystem\MountManager' not found
vagrant#homestead:~/projects/xxxx_com$
Have you got an idea?
Probably you added new package to composer.json but you haven't run composer install. So make sure you run:
composer install
and after that run
php artisan vendor:publish
You might need to update your composer, run composer update
and see if that help.

Resources