Can the OpenShift laravel cartridge be updated using composer selfupdate? - laravel

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

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.

Installing Laravel auth in an already existing app

I have an existing Laravel app running version 6.2
How would I do the equivalent of composer require laravel/ui in an already existing Laravel app.
You can run
composer require laravel/ui
in existing app as well.
After that, you can run the following command:
php artisan ui vue --auth
This command will create the necessary views for authentication and put them in the resources/views/auth folder.

Error on installing backpack for laravel 6.0.3

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.*

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.

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?

Resources