Error on installing backpack for laravel 6.0.3 - laravel

I did a fresh Laravel 6.0.3 install on laragon and I am trying to install backpack.
I did
composer require backpack/crud correclty
but then when I tried to do the next step
php artisan backpack:base:install
I get an error
Symfony\Component\Process\Exception\ProcessFailedException : The command "composer require backpack/generators --dev" failed.
Exit Code: 2(Misuse of shell builtins)
I tried to delete the cache, to add timeout 600 and I do not know what else to do.

There was indeed a problem with installing backpack/generators - composer did not fall back to an appropriate version, but it is now fixed. You should be able to run php artisan backpack:base:install without problems.
If you hit any roadblocks during the installation, I recommend you follow the manual installation procedure, instead of php artisan backpack:base:install.

Backpack v3.4 is a collection of packages for Laravel 5.5 / 5.6.
Right under requirement in Backpack.io it says it requires laravel 5.5 or 5.6 and PHP7.
It's not compatible with laravel 6.*

Related

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0"

I upload my laravel project on azure. However when I go to the link I got this error. My project php version is 8.0.0 and my azure php version is 7.4.11. How can I can increase the version on my azure php.
If you are deploying your application, you need to update your php version to php version 8
I have the same problem and now it already solve.
Check PHP version commend # php --version
If your PHP 7.4 you need to commend in your laravel project # composer update
If you php >=8.0.0 you need to install php 7.4 and commend in your laravel project # composer update
Simply go to vendor/composer/ , then you will find platform_check.php file. Just open it and comment full code. Save it. That's it. You can now use it with lower php verson.

Difference in files laravel install local & on server

When I install laravel on the server via the command:
cd httpdocs/ && /opt/plesk/php/7.1/bin/php /usr/lib64/plesk-9.0/composer.phar create-project laravel/laravel --prefer-dist
I am missing files and folders in the laravel directory, which I would have when I install laravel local on my laptop with the command:
composer create-project laravel/laravel --prefer-dist
The commands are the same, but why am I missing files on the server? Example of a missing file: /app/Http/routes.php and missing folder: /app/events/
In both situations laravel works and shows the default laravel page when I visit the url.
Hope to get a clear answer, I couldn't find it on google or here on stackoverflow.
Just tested this. When using composer create-project, it looks like it will use the maximum version it can while satisfying project requirements.
Therefore, if you're installing using PHP 7.1, it will be able to install the latest, Laravel 5.6. However, if you're running create-project using PHP 5.6, it will only attempt to install Laravel 5.4 since Laravel 5.5 requires PHP 7.0 and 5.6 requires 7.1.
This leads me to believe you don't have a recent version of PHP set up on your local system.

Cannot install Laravel correctly

I followed all the instruction by installing composer and then Laravel. Also I did everything what was shown in laracast series for installing Laravel and composer.
BUT I have some problems and I cannot solve them:
I don't have Vendor folder in my Laravel app folder
I cannot launch command 'composer artisan' as it says that
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "artisan" is not defined"
"php artisan" also doesn't work
All the answer in the web I have already tried to resolve my problems but nothing worked for me
Please, tell me, how can I install Laravel correctly and use it without errors
Run composer install or composer update. This will create the vendor folder and download all the dependent modules as mentioned in the composer.json
I want to add some more details which are asked but not clearly answered.
You did not install the composer dependencies. Try composer install.
It is not composer artisan. If you execute that command, you say hey composer! run your artisan command. And it says "Command "artisan" is not defined."
It is php artisan. But if you don't run composer install, php artisan will not work either. Because you are missing Symfony Console Component in your project (not the one used by composer) as well as a complete Laravel installation. Both will also be installed by the composer install command.
Well. I've solved my problem. As I mentioned before I had tried all the answer in the web but nothing had helped me. So then I just deleted my laravel project and ran this command
sudo apt-get upgrade
After some time packages were upgraded and I created new Laravel project. And Laravel started working perfectly! So in any incomprehensible situation do apt-get upgrade :))

how to make php artisan command available?

I read previous posts here about same problem but they did not solve my problem. I am running wamp latest version on windows 7 and I cloned a laravel app from github then I ran composer install on the root folder of the app and all vendors installed. however I still can not execute php artisan list on the app root folder
I tried also this command
composer global require "laravel/installer=~1.1"
but same problem also there is no laravel folder installed inside vendor folder. I dont know what laravel version used with this web app
So how I can make php artisan work ?
Update:
I opened composer.json file and I found no Laravel frame work to install !! should I return to the developer who made this or I just add Laravel package to composer.json and run composer install again ? if so what I should add to the composer.json ? I dont know which version to install !!
Your project has to have an artisan file in the root directory, otherwise the php artisan command won't work.
I had a similar issue. Fixed it by using the following command, which results in a clean installation.
composer create-project --prefer-dist laravel/laravel my-project
If errors occur, your CLI will show them.
Docs

Can the OpenShift laravel cartridge be updated using composer selfupdate?

I'm testing an OpenShift cartridge with laravel 4.2.
When I try to execute the command
composer selfupdate
I get this error:
[Composer\Downloader\FilesystemException]
Filesystem exception:
Composer update failed: the "/var/lib/openshift/.cartridge_repository/redhat-php/0.0.24/usr/bin/composer.phar" file could not be written
When you run composer self-update this updates composer itself. If you have globally installed composer then you likely need to use sudo to have permission to overwrite that file.
If you're just wanting to update/install laravel then you can run composer update and composer install as appropriate.
First off - no the OpenShift PHP cartridge cannot be updated using composer self-update. Updating Composer requires root privileges.
The Laravel 5 QuickStart uses a custom version of OpenShift's PHP 5.4 cartridge. The only change with the custom PHP 5.4 cartridge is Composer has been updated. You can either switch over to Laravel 5, or simply run Laravel 4.2 using the custom PHP 5.4 cartridge.
To run Laravel 5.0 with the custom cartridge using the QuickStart:
rhc app create laravelapp https://raw.githubusercontent.com/luciddreamz/openshift-php/master/metadata/manifest.yml mysql-5.5 --from-code=https://github.com/luciddreamz/laravel
If you want to Run Laravel 4.2, you can create an empty PHP 5.4 app with MySQL using the custom cartridge:
rhc app create laravelapp https://raw.githubusercontent.com/luciddreamz/openshift-php/master/metadata/manifest.yml mysql-5.5

Resources