Laravel does not need to fill out a form to log in?

laravel"s default login process is to log in through the form user entering the account password, and then submit the form to log in.

but I want to access a method in a controller, and then log in to a user (specified by the user in the controller), that is, log in without submitting a form,

is there a way to achieve this?

Mar.10,2021

use a middleware, and then attach the middleware to the desired route.
the mid-price code is basically like this:

  

uses Auth::guard ()-> login ($user, true); is solved;
where $user is the User model, and the Authenticatable class needs to be referenced in the model

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9b11f-182d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9b11f-182d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?