joseluisac

Experience

680

1 Best Reply Awards

  • Member Since 1 Month Ago
  • 0 Lessons Completed
  • 0 Favorites

12th October, 2018

joseluisac left a reply on How To Enable Authentification On A Laravel Project That Is Not New? • 1 week ago

This is a recommendation but there isn't problem if you run this command with advanced work.

I tried sometime in my application, and there wasn't problem.

11th October, 2018

joseluisac left a reply on Issue With Post Categories In Blade • 1 week ago

Can you try this?

@switch($post->postcategories['name'])

10th October, 2018

joseluisac started a new conversation It Is Posible A Query For My Data? • 1 week ago

Hi, Good night.

I have a doubt with a query.

I have this tables

Schema::create('patients', function (Blueprint $table) {
            $table->bigIncrements('id'); // Example 12
            $table->string('name',100); //Example Jonh Con
            $table->date('birthDate');  // Example 2018-01-01 
        });
schema::create('consultations', function (Blueprint $table) {
            $table->bigIncrements('id'); // Example 2
     $table->bigInteger('patient_id'); //Example 12             
    $table->date('date');  // Example 2018-09-01 

            //More Columns
        });
    }
 Schema::create('anthropometries', function (Blueprint $table) {
            $table->bigIncrements('id'); // Example 2
            $table->bigInteger('consultation_id')->unsigned(); // Example 2
            $table->double('height'); //Example 50 
            $table->string('mHeight'); // Example kg
        //More Columns
        });

My model Consultation

public function anthropometries()
    {
        return $this->hasOne('App\Models\Anthropometries','consultation_id');
    }

Is there some query for get data of anthropometries with average for months ? Example

{
    Juanary : {
        height:50,
    }
    February:{
        height:51,
    }
    etc...
}

PD: there is a query from the date of birth?

30th August, 2018

joseluisac left a reply on I Want To Have A Clean Code. • 1 month ago

@bobbybouwmann I'm sorry, I'm new in laracast, i didn't know about GitHub-flavored code blocks, thanks you.

@Cronix Thanks you, this code is very good. very thanks.

joseluisac started a new conversation I Want To Have A Clean Code. • 1 month ago

Hi.

I'm developed a rest api with Laravel.

I have a doubt, i want to develop a foreach for this code, i think that is repeated code, i'll like to have my optimized code.

$estado = $query->pluck('estado')->unique()->values()->all(); $ciudad = $query->pluck('ciudad')->unique()->values()->all(); $municipio = $query->pluck('municipio')->unique()->values()->all(); $colonia = $query->pluck('colonia')->unique()->values()->all(); $cp = $query->pluck('cp')->unique()->values()->all(); $data = [ 'estado' => $estado, 'ciudad' => $ciudad, 'municipio' => $municipio, 'colonia' => $colonia, 'cp' => $cp, ];

Can you help me?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.