Installing Laravel auth in an already existing app - laravel

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.

Related

Deploy laravel from github to heroku gives error" In order to use the Auth::routes() method, please install the laravel/ui package"

I uploaded a laravel app working fine locally on github and deployed on heroku. but I kept Getting this error when deployed on heroku. view Error Image
I tried these cmds on heroku console
composer install
composer require laravel/ui
php artisan ui bootstrap --auth
but when ever I enter "php artisan ui bootstrap --auth" it says artisan not a directory or not found but its there.
I have tried "composer dump-autoload" as well, still same..
pls help
You can't install things interactively on Heroku. At best, it will appear to work temporarily but get reverted within 24 hours. All dependencies must be declared so Heroku can install them at build time.
Run composer require laravel/ui locally, then commit your updated composer.json and composer.lock files and redeploy.

Illegal instruction: 4 while installing passport package in laravel

I have a project created in reactjs as frontend and laravel as backend, I have used two packages for authentication in backend I have used Jetstream package and in frontend I need to user Passport package, now when a run php artisan passport:install it when I get this error Illegal instruction: 4 I have tried to find different resource but I have not get any working. Please any help on how to fix this. Thanks
Did you already try removing the passport package & reinstalling it?
composer remove laravel/passport
composer require laravel/passport
You could also try:
composer dump-autoload

Install Laravel 8 without Jetstream

Is there any chance to install Laravel 8 without Jetstream? I want to use Laravel 8 + Inertiajs + Vue.js + Tailwind. Unfortunately Orchid admin panel compatible just with Laravel 8; that's why I have to use Laravel 8.
Yes, you can install laravel 8 without Jetstream, Jetstream is used for Auth, if you decide to create your auth by yourself you are free, or you can use Laravel Breeze if you are anti-Jetstream for Auth
composer create-project laravel/laravel nameofprojectt --prefer-dist
if I get your question very well, that will just install a laravel project without Jetstream
Yes, Laravel 8 is by default getting installed without Jetstream.
You can run the following command to start working without Jetstream.
Windows / MacOS:
curl -s https://laravel.build/example-app | bash
Don't forget to repalce "example-app" with the project/directory name you want to give it.
Laravel installation
Also I recommend to look at Laravel Sail for an easy development server:
Laravel Sail
yeah you can
create project laravel
$ laravel new blog
replace blog by your project name
then go to inertia website, follow the steps and install inertia and vuejs
then install tailwindcss
it's work
Yes you can
with composer
composer create-project laravel/laravel example-app
cd example-app
php artisan serve
First Install new Laravel project using the below command:
composer create-project --prefer-dist laravel/laravel YourProject
After that install InertiaJS in your project. For more information go to the below link:
https://inertiajs.com/server-side-setup
if you have composer installed you can use this command line:
composer create-project laravel/laravel App_Name

Laravel 7 add React.js to project without composer require laravel/ui?

I need to connect React.js to Laravel 7.23 project with UIkit.css framework.
Standard solution
composer require laravel/ui
php artisan ui react
php artisan ui react --auth
npm install
But, this solution includes bootstrap.css framework which I do not need.
I also found
php artisan preset react
But on execution I get "Command "preset" is not defined."
laravel-ui is the new laravel frontend Scaffolding library. php artisan preset is no longer supported.
php artisan ui react will give you the react Scaffolding. There is no default option for UIkit.css If you do not need bootstrap just remove it and add something you want.
Hope that answers all your concerns.
For installing react in laravel 7, refer to documentation
Install laravel ui composer package
composer require laravel/ui
Install react
php artisan ui react
Install react with auth
php artisan ui react --auth
Make sure you run npm install and npm run dev

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