Use MySQL PASSWORD () in Laravel Eloquent

When coding a registration for an old game, this game uses PASSWORD () for encryption.
Is there any way to use this feature in Laravel Eloquent?

current form:

 public function registerPost(Request $request)
            'login' => 'required|min:4|unique:account',
            'email' => 'required|email|unique:account',
            'password' => 'required|min:8',
            'repeat_password' => 'required|same:password',
        ), (), (
            'login' => 'Username',
            'password' => 'Password',
            'email' => 'E-Mail',
            'repeat_password' => 'Repeat password'

        $data = $request->all();

        if (Account::create($data)) {
            return Redirect::to("/registration")->withErrors(('success' => 'Account created'));

        return Redirect::to("/registration")->withErrors(('message' => 'Account creation failed'));

how to restart or manipulate the auto_increment id in my database with laravel

The following happens, I do a little practice with Laravel by making a list of users when everything is stored in the database. One of the fields is the ID, which increases with each record from 1,2,3,4,5. But when I delete a user (from the Laravel-created site) I have a hole. Suppose I want to remove the user from ID 3, it will be deleted and 1,2,4,5 will remain. However, when I register a new user, the missing field is not filled in, leaving 1,2,4,5,6. and I want the missing field to be filled in

I don't know how important it is to create a real database that a customer asks for, but it is something that bothers me and I want to know if there is a way to fix it and if they tell me that it doesn't matter after I accept it, I just want to know. for the recording I use LARAVEL

laravel – I have a question about "OAuth Grant Types", which one should I use?

In the backend I use Laravel with the Passport package for the Oauth server, but I have some doubts as to which type of grant to use.

At the moment I want to have one login endpoint and another one to register.

For registration I know (or I think) that the one I need is password granting with an "API proxy", but for registration I don't know which one, I don't want to leave this public endpoint, I want to restrict that only created clients can use it theoretically, I should use implicitly, but I'm not sure how to use it.

The other question is whether, if the user registers and then logs in, they should revoke the token created with the implicit.

Eloquent Laravel 6 – stack overflow in Spanish

I was looking for a way to ask this question with eloquent de laravel

SELECT * FROM `procedures` WHERE `service_id` = 1 AND (`sex` = 'male' OR `sex` = 'all')

I found it difficult to continue with my exercises. I did it that way

DB::SELECT("SELECT * FROM procedures WHERE service_id = $id AND (sex = 'male' OR sex = 'all')"); 

I tried some documentation methods but couldn't find a solution

eloquent – Laravel Accessor Pivot Table in Laravel 6

I'm trying to calculate the sum of Backend in Laravel 6 with Accessor With the following code below …

  // Sale Model

   protected $appends = ('grand_total');

    public function products()
        return $this->belongsToMany(AppProduct::class)->withPivot('quantity', 'discount', 'unit_price');

    public function getGrandTotalAttribute()
        foreach ($this->products as $product) {
            return $this->pivot->unit_price - ($this->pivot->unit_price * $this->pivot->discount) * $this->pivot->quantity;

I have an error trying to access it from API

An attempt is made to set the & # 39; unit_price & # 39; of a non-object

Please give me an idea? Thank you very much….

How do I achieve this property in Laravel

I have to access the "40", it is in Laravel. Actually, I have to add the values ​​to a column, but depending on their reference ID

object(stdClass)#263 (1) { ("sum(cantidad_entrada)")=> string(2) "40" }

public function index()

    $inventario = DB::table('inventarios')
    ->join('productos', 'inventarios.fk_producto', '=', 'productos.id_producto')
    ->join('entradas', 'inventarios.fk_entrada', '=', 'entradas.id_entrada')
    ->join('salidas', 'inventarios.fk_salida', '=', 'salidas.id_salida')
    ->select('productos.descripcion', 'inventarios.*', 'salidas.cantidad_salida','entradas.cantidad_entrada')

    $entradas = DB::table('entradas')
    ->join('productos', 'entradas.fk_producto_entrada', '=', 'productos.id_producto')

    $salidas = DB::select('select sum(cantidad_salida) as cantidad_salida from salidas');

    return view('inventario.index', compact('inventario', 'entradas', 'salidas'));

Javascript – Display a selection within a PHP modal – Laravel

Good morning, I'm working on a project in Laravel and I'm using Mysql. In this case I have to create a transaction within modalwhere I have the fields:

The problem occurs, however, if in the type field a choose The option I need (income, relief) is not shown. If you can help me how I can show these two options.
I leave the modal code:

Laravel does not receive updates for a command. It also works when I clean the file

I have a command that I start with the code:

php artisan reminder

I try to edit the command, but laravel does not receive the updates. I literally tried to clean up the file (of the command), but the command still worked.

I tried these commands too, but to no avail:

C:xampphtdocsmy_proj>c:/xampp/php/php.exe artisan cache:clear
Cache cleared successfully.

C:xampphtdocsmy_proj>c:/xampp/php/php.exe artisan route:clear
Route cache cleared!

C:xampphtdocsmy_proj>c:/xampp/php/php.exe artisan config:clear
Configuration cache cleared!

C:xampphtdocsmy_proj>c:/xampp/php/php.exe artisan view:clear
Compiled views cleared!

PHP – Capture Javascript variable value in Laravel Route

I'm developing a screen where I have to redirect after touching a button in jQuery. When passing the parameter to the route (from Laravel), however, I get an error when creating the URL because it is created literally.

The button code in jQuery is as follows:

$('#btnDelete').click(function(event) {
    var valorId = $('#nId').val();

    window.location.href = '{{ route('usuario.delete', ('id' => '+valorId+') ) }}';

However, the result is literal:

I tried to put a period instead of + and the same …

$('#btnDelete').click(function(event) {
    var valorId = $('#nId').val();

    window.location.href = '{{ route('usuario.delete', ('id' => '.valorId.') ) }}';

Even as the last test, I tried not to put anything with the variable in the single quotes of the ID, but then it already gives me a page fault.

The route of this address is as follows:

Route::post('usuario/delete/{id}', ('uses' => 'UserController@delete', 'as' => 'usuario.delete'));