Danven

Danven

Member Since 9 Months Ago

Experience Points
1,500
Total
Experience

3,500 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
11
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
1,500 XP
Aug
13
2 months ago
Activity icon

Replied to Day And Month Inverted When Saving In SQL SERVER 2008 Base

In Model:

protected $ dateFormat = 'Y-d-m H: i: s.000';

In Laravel create:

MyModel::create(['MyDateTime' => '2020-08-13 13:00:00','MyDate' => '2020-08-13' ]);

Plain SELECT return:

[MyDateTime] => 2020-08-13 13:00:00.000
[MyDate] => 2020-08-13
Activity icon

Replied to Day And Month Inverted When Saving In SQL SERVER 2008 Base

The table has a DATE type field to which, without modifying anything, the date YYYY-MM-DD is saved and another DATETIME to which if I do not add the variable "$dateformat" in the model it alters the position of the day and the month. In other words, in the database the two fields expect YYYY-MM-DD but when passing the same variable to the DATETIME, the MONTH and DAY data arrives inverted. Adding the variable "$dateformat" in the model solves it. But the data of the variable "$dateformat" is wrong, that is, I have to put an incorrect data so that it passes the correct value.

MyModel::create(['MyDateTime' => '2020-08-12 13:00:00','MyDate' => '2020-08-12' ]);
Aug
12
2 months ago
Activity icon

Started a new Conversation Day And Month Inverted When Saving In SQL SERVER 2008 Base

On a sqlserver 2008 db. I need to save YEAR-MONTH-DAY ... In a datetime field. Send: "2020-08-12 13:00:00", save "2020-12-08 13:00:00". But if I mark on the model:

protected $ dateFormat = 'Y-d-m H: i: s.000';

It keeps well. What's going on?

Jul
28
2 months ago
Activity icon

Started a new Conversation Go Through Config() Secondary Database Connection

I have a main base and a secondary one. Depending on the environment, the type of secondary database changes.

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class MyModel extends Model
{
    
    protected $connection = config('database.secondary');

Jul
25
3 months ago
Activity icon

Replied to Save To Database With Blank Spaces To The Right

That was the first thing I tried.

I have already ruled out the option of saving the spaces in the base, but I still have the question of how to do it. The data entry was not done by meditating an html form, the tests were done in the same code, and all the blanks were eliminated.

Thank you as well

Jul
23
3 months ago
Activity icon

Replied to Save To Database With Blank Spaces To The Right

Thnx but:

In Model:

public function setEmptySpaceAttribute($value) { $this->attributes['field'] = $value . ' '; }

$mymodel = new MyModel(); $mymodel->empty_space = 'hello'; $mymodel->save();

In database: 'hello'

Activity icon

Started a new Conversation Save To Database With Blank Spaces To The Right

I need to be able to save empty characters after text is finished.

mymodel::create([ 'field' => 'hello ']);