Support the ongoing development of Laravel.io →
posted 3 years ago
Last updated 2 years ago.
0

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

1

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!

0

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

0

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 = []; }

?>`

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.