Uhmm first of all, you shoul put your credentials in .env
file, after that, you should create the models to refer your tables on your project, next you could run the command composer require laravel/ui
, after that run the command php artisan ui:controllers
and you could put your logic for authentication in the file app/Http/Controllers/Auth/LoginController
, finally add the route in routes/web.php using Auth::routes();
GL HF
guto-azeredo liked this reply
As a beginner... may I ask you how I create a model from an already existing table? my table name is "usuario" connection with oracle is working fine!
Well, the model for users table is createad by default, go to App//Models//User and add protected $table='usuario'
and that's all!. To create models for the rest, use php artisan make:model modelName
Yes, you can create a model PHP artisan make:model Profile and then create its controller to handle CRUD operations. (Remember the name of the model should be singular, not plural so that automatically the name of the table becomes the pluralized name.) That is, Model: User, Table: users Model: Order, Table: orders etc
`<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Profile extends Model { protected $guarded = []; }
?>`
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community