how make (make: auth) Laravel 6 for api without installing ui - php

I am testing laravel 6 creating an api.
The command make:auth has been deleted.
I have to install laravel/ui although I am creating an api?

Have you considered Lumen? It's Laravel's library for micro-services and APIs.
Otherwise, it does look like you'll need to install laravel/ui as per the documentation. Then you could auto-generate auth routes and views:
composer require laravel/ui --dev
php artisan ui vue --auth

Related

Remove frontend scaffolding from Laravel 8.x

I have installed laravel/ui from composer and since I am learning I tried to setup bootstrap with it so I installed bootstrap from npm and then ran php artisan ui bootstrap. I was able to set it up properly.
I now want to remove the installed frontend scaffolding and I couldn't find anywhere how to do it.
So far I have tried php artisan ui none but none is not a valid preset.
You can remove the package by running:
composer remove laravel/ui
You'll have to remove the scaffolding manually.

How to install vue js in laravel 8 without jetstream and Inertia?

I'm working on a project with Laravel 8 version and I want to work with vue js components without installing jetstream and inertia. Is it needed to install Jetstream with inertai in order to work with vue js in laravel 8?
You don't need any additional Laravel components to use Vue. You only need npm or yarn to install packages and create a composer.json file. Follow the instructions at https://v2.vuejs.org/v2/guide/ (for Vue2) or https://v3.vuejs.org/guide/introduction.html for (Vue3) for installation.
For Laravel/Vue, Vue will be used as a front-end, which will use ajax/Axios to use GET/POST requests to Laravel for the backend.
At first, you need to install laravel/ui package by running composer require laravel/ui:^2.4 as Said in laravel doc version 7
After that, you should run php artisan ui vue for adding vue scaffolding to the project.
after create laravel project,you need to install laravel/ui and don't specify the version
composer require laravel/ui
then run php artisan ui vue --auth for Generate login / registration
scaffolding...
php artisan ui vue without login/registration

Laravel, Auth controller doesn't exist at app/http/controllers or anywhere

I have recently installed laravel , and started a new project . after creating the laravel project (tried twice : through laravel new command and composer create-project ) all is set , but the problem is that i don't find Laravel, Auth controller doesn't exist at app/http/controllers or anywhere !!
i could not understand why ?
Laravel6+ versions uses laravel/ui for authentication.
Run the below commands to install laravel/ui and generate authentication
composer require laravel/ui:^1.0 --dev
php artisan ui bootstrap --auth
npm install
npm run dev
Laravel6 -> authentication
If you are using Laravel5 or less then use below command to generate the same:
php artisan make:auth
Laravel5 -> authentication

I want to create login in laravel, and have problem in cmd with: php artisan make:auth

When I run this command: php artisan make:auth
I get an error:
command "make:auth" is not defined.
I have a problem in command with php artisan make:auth. How can I create a login in laravel
In Laravel 6 auth command has been removed and authentication scaffolding has been moved as separate package named laravel/ui
Here you can read about Laravel 6 and laravel/ui and also here you can read about laravel/ui in laravel documentation
Laravel 6.0 has removed this command:php artisan make:auth
Update for Laravel 6: The command to implement Auth is as follows:
composer require laravel/ui
php artisan ui vue --auth
This command will install a layout view, registration and login views, as well as routes for all authentication end-points. A HomeController will also be generated
NOTE: If your login page only shows plain HTML. And CSS is not loading properly then run this two command:
npm install
npm run dev

Laravel Passport not able to install on laravel 5.4.*

Hi I am new to laravel and trying to install the Laravel passport on an existing laravel project. I am trying to run this command
composer require Laravel/passport
When I run the command it shows nothing to install or update. But, I can see that in my composer I have Laravel version ~4.0 and I am using PHP7.1. I have also installed one of its dependency illuminator/encryption=5.4.36.
Can somebody help me out? How to install my Laravel passport?
I am running laravel 5.4.36 (it's locked)
PS: Had to remove composer file content.
You have already installed Laravel Passport. Your composer / console returns that message because its already downloaded.
Your composer.json tells you that you downloaded version 4.0:
"laravel/passport": "~4.0",
Now you just have to move on I recommened going through the documentation.
There is also a nice tutorial from Taylow Otwell regarding Laravel Passport.
https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13
To get started, install Passport via the Composer package manager:
composer require laravel/passport
Next, register the Passport service provider in the providers array of your config/app.php configuration file:
Laravel\Passport\PassportServiceProvider::class,
then the command line again type:
php artisan migrate
For more info look: https://laravel.com/docs/5.4/passport

Categories