Laravel's words conveyed by Blade somehow become capitalized without explanation

Good evening, I have a rather strange problem here. I cannot find any resource on the Internet regarding what is happening.

When I display the information in my blade template using the following in the controller:

$results = DB::table('datatest') -> get();

    if ($results != null) {

        return view('userview') -> with ('name', $results);

    }

It smooths out every word passed into my blade template. Therefore, let's say I pass a complete paragraph from my database, every first letter of every word in my paragraph becomes a capital letter.

Here is a cutout from my view:

@foreach ($name as $name)

<tr>

<td>
{!!Form::label($name -> Author)!!}
</td>

<td>
{!!Form::label($name -> Title)!!}
</td>

<td>
{!!Form::label($name -> Year)!!}
</td>

<td>
{!!Form::label($name -> Abstracts)!!}
</td>

</tr>
@endforeach

//

On the other hand, when I choose to pass information to another template with the following:

$data = DB::table('datatest')->where('id', $id)->first();

    $Author = $data -> Author;
    $Title = $data -> Title;
    $Year = $data -> Year;
    $Abstracts = $data -> Abstracts;

    $results = array('AUTHOR' => $Author, 'TITLE' => $Title, 'YEAR' => $Year, 'ABSTRACTS' => $Abstracts);

    return view('userview2') -> with ($results);

This is the ability to transfer data to my Blade template, which does not change the meaning of the word:

</tr>
<td>{!!Form::label('title', $TITLE)!!}</td>
<td>{!!Form::label('author', $AUTHOR)!!}</td>
<td>{!!Form::label('year', $YEAR)!!}</td>
<td>{!!Form::label('abstracts', $ABSTRACTS)!!}</td>
</tr>

- ? , - ?

!

+4
1

Form::label. , , , :

{!! Form::label('email', 'e-mail address') !!}

:

<label for="email">e-mail address</label>

, Form::label - , :

{!! Form::label('my email'); !!}

:

<label for="my email">My Email</label>

, null, $name formatLabel(), ucwords(), .

protected function formatLabel($name, $value)
    {
        return $value ?: ucwords(str_replace('_', ' ', $name));
    }
+4

All Articles